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
Thread safety unknown!
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
Thread safety unknown!
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
Thread safety unknown!
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
Thread safety unknown!
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;
}