#include <string>
Go to the source code of this file.
|
#define | THROW(exception) |
|
#define | THROWM(exception, message) |
|
#define | THROWMF_FILEEXCEPTION(message, filenameorfileinfo) |
|
#define | THROWT(exception) |
|
#define | THROWMT(exception, message) |
|
#define | THROWMFT_FILEEXCEPTION(message, filenameorfileinfo) |
|
#define | FC_THROWM(_exception, _msg) |
|
#define | THROW_CON_ERR_IF(_condition_, _msg_) |
|
#define | THROW_FAIL_NDONE_IF(_condition_, _msg_) |
|
#define | OutOfRange_Raise_if(CONDITION, MESSAGE) |
|
#define | ConstructionError_Raise_if(CONDITION, MESSAGE) |
|
#define | VectorWithNullMagnitude_Raise_if(CONDITION, MESSAGE) |
|
#define | NotaNumber_if(CONDITION, MESSAGE) |
|
◆ ConstructionError_Raise_if
#define ConstructionError_Raise_if |
( |
|
CONDITION, |
|
|
|
MESSAGE |
|
) |
| |
◆ FC_THROWM
#define FC_THROWM |
( |
|
_exception, |
|
|
|
_msg |
|
) |
| |
Value: do \
{ \
std::stringstream ss; \
ss << _msg; \
THROWM(_exception, ss.str().c_str()); \
} while (0)
◆ NotaNumber_if
#define NotaNumber_if |
( |
|
CONDITION, |
|
|
|
MESSAGE |
|
) |
| |
◆ OutOfRange_Raise_if
#define OutOfRange_Raise_if |
( |
|
CONDITION, |
|
|
|
MESSAGE |
|
) |
| |
◆ THROW
#define THROW |
( |
|
exception | ) |
|
Value: { \
exception myexcp; \
myexcp.setDebugInformation(__FILE__, __LINE__, __func__); \
throw myexcp; \
}
the macros do NOT mark any message for translation If you want to mark text for translation, use the QT_TRANSLATE_NOOP macro with the context "Exceptions" and the right throwing macro from below (the one ending in T) example: THROWMT(Base::ValueError,QT_TRANSLATE_NOOP("Exceptions","The multiplicity cannot be increased beyond the degree of the B-Spline."));
N.B.: The QT_TRANSLATE_NOOP macro won't translate your string. It will just allow lupdate to identify that string for translation so that if you ask for a translation (and the translator have provided one) at that time it gets translated (e.g. in the UI before showing the message of the exception).
◆ THROW_CON_ERR_IF
#define THROW_CON_ERR_IF |
( |
|
_condition_, |
|
|
|
_msg_ |
|
) |
| |
◆ THROW_FAIL_NDONE_IF
#define THROW_FAIL_NDONE_IF |
( |
|
_condition_, |
|
|
|
_msg_ |
|
) |
| |
◆ THROWM
#define THROWM |
( |
|
exception, |
|
|
|
message |
|
) |
| |
Value: { \
exception myexcp(message); \
myexcp.setDebugInformation(__FILE__, __LINE__, __func__); \
throw myexcp; \
}
◆ THROWMF_FILEEXCEPTION
#define THROWMF_FILEEXCEPTION |
( |
|
message, |
|
|
|
filenameorfileinfo |
|
) |
| |
Value: { \
FileException myexcp(message, filenameorfileinfo); \
myexcp.setDebugInformation(__FILE__, __LINE__, __func__); \
throw myexcp; \
}
◆ THROWMFT_FILEEXCEPTION
#define THROWMFT_FILEEXCEPTION |
( |
|
message, |
|
|
|
filenameorfileinfo |
|
) |
| |
Value: { \
FileException myexcp(message, filenameorfileinfo); \
myexcp.setDebugInformation(__FILE__, __LINE__, __func__); \
myexcp.setTranslatable(true); \
throw myexcp; \
}
◆ THROWMT
#define THROWMT |
( |
|
exception, |
|
|
|
message |
|
) |
| |
Value: { \
exception myexcp(message); \
myexcp.setDebugInformation(__FILE__, __LINE__, __func__); \
myexcp.setTranslatable(true); \
throw myexcp; \
}
◆ THROWT
#define THROWT |
( |
|
exception | ) |
|
Value: { \
exception myexcp; \
myexcp.setDebugInformation(__FILE__, __LINE__, __func__); \
myexcp.setTranslatable(true); \
throw myexcp; \
}
◆ VectorWithNullMagnitude_Raise_if
#define VectorWithNullMagnitude_Raise_if |
( |
|
CONDITION, |
|
|
|
MESSAGE |
|
) |
| |