# Group SeqAn Exception Handling
Macros supporting exception handling on various platforms.

## Grouped Macros Overview

`SEQAN_TRY {} SEQAN_CATCH() {}` Replaces the C++ catch keyword.
`#define SEQAN_EXCEPTIONS` Determines whether exceptions are enabled or not.
`SEQAN_THROW(Exception);` Replaces the C++ throw keyword.
`SEQAN_TRY {} SEQAN_CATCH() {}` Replaces the C++ try keyword.

## Grouped Macros Detail

### ExceptionHandling#SEQAN_CATCH

Defined in
  <seqan/basic.h>

`SEQAN_TRY {} SEQAN_CATCH() {}`
Replaces the C++ catch keyword.

Data Races
  If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
See Also
  Exception
  SEQAN_THROW
  SEQAN_TRY

When exceptions are disabled, i.e. SEQAN_EXCEPTIONS is set to false, the code inside the catch block is never executed.

#### Examples

See SEQAN_TRY for a full example.

### ExceptionHandling#SEQAN_EXCEPTIONS

Defined in
  <seqan/basic.h>

`#define SEQAN_EXCEPTIONS`
Determines whether exceptions are enabled or not.

Data Races
  If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
See Also
  Exception
  SEQAN_CATCH
  SEQAN_THROW
  SEQAN_TRY

### ExceptionHandling#SEQAN_THROW

Defined in
  <seqan/basic.h>

`SEQAN_THROW(Exception);`
Replaces the C++ throw keyword.

Data Races
  If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
See Also
  Exception
  SEQAN_CATCH
  SEQAN_FAIL
  SEQAN_TRY

When exceptions are disabled, i.e. AssertMacros#SEQAN_EXCEPTIONS is set to false, the macro turns into SEQAN_FAIL.

#### Examples

See SEQAN_TRY for a full example.

### ExceptionHandling#SEQAN_TRY

Defined in
  <seqan/basic.h>

`SEQAN_TRY {} SEQAN_CATCH() {}`
Replaces the C++ try keyword.

Data Races
  If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.
See Also
  Exception
  SEQAN_CATCH
  SEQAN_THROW

When exceptions are disabled, i.e. SEQAN_EXCEPTIONS is set to false, the code inside the try block is always executed.

#### Examples

    SEQAN_TRY
    {
        SEQAN_THROW(Exception)
    }
    SEQAN_CATCH(Exception const & e)
    {
        std::cerr << e.what() << std::endl;
    }

#### Dox Sources

    /*!
     * @defgroup ExceptionHandling SeqAn Exception Handling
     *
     * @brief Macros supporting exception handling on various platforms.
     *
     * @macro ExceptionHandling#SEQAN_EXCEPTIONS
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Determines whether exceptions are enabled or not.
     *
     * @signature #define SEQAN_EXCEPTIONS
     *
     * @see ExceptionHandling#SEQAN_TRY
     * @see ExceptionHandling#SEQAN_CATCH
     * @see ExceptionHandling#SEQAN_THROW
     * @see Exception
     *
     * @macro ExceptionHandling#SEQAN_TRY
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Replaces the C++ try keyword.
     *
     * @signature SEQAN_TRY {} SEQAN_CATCH() {}
     *
     * When exceptions are disabled, i.e. SEQAN_EXCEPTIONS is set to false, the code
     * inside the try block is always executed.
     *
     * @section Examples
     *
     * @code{.cpp}
     *
     * SEQAN_TRY
     * {
     *     SEQAN_THROW(Exception)
     * }
     * SEQAN_CATCH(Exception const & e)
     * {
     *     std::cerr << e.what() << std::endl;
     * }
     *
     * @endcode
     *
     *
     * @see ExceptionHandling#SEQAN_CATCH
     * @see ExceptionHandling#SEQAN_THROW
     * @see Exception
     *
     * @macro ExceptionHandling#SEQAN_CATCH
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Replaces the C++ catch keyword.
     *
     * @signature SEQAN_TRY {} SEQAN_CATCH() {}
     *
     * When exceptions are disabled, i.e. SEQAN_EXCEPTIONS is set to false, the code
     * inside the catch block is never executed.
     *
     * @section Examples
     *
     * See @link ExceptionHandling#SEQAN_TRY @endlink for a full example.
     *
     * @see ExceptionHandling#SEQAN_TRY
     * @see ExceptionHandling#SEQAN_THROW
     * @see Exception
     *
     * @macro ExceptionHandling#SEQAN_THROW
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Replaces the C++ throw keyword.
     *
     * @signature SEQAN_THROW(Exception);
     *
     * When exceptions are disabled, i.e. AssertMacros#SEQAN_EXCEPTIONS is set to
     * false, the macro turns into SEQAN_FAIL.
     *
     * @section Examples
     *
     * See @link ExceptionHandling#SEQAN_TRY @endlink for a full example.
     *
     * @see ExceptionHandling#SEQAN_TRY
     * @see ExceptionHandling#SEQAN_CATCH
     * @see AssertMacros#SEQAN_FAIL
     * @see Exception
     */