Cryptography Reference
In-Depth Information
as well as classes of the following type that build on it:
// division by zero
class LINT_DivByZero : public LINT_Error
{
public:
LINT_DivByZero (const char* func, int line, const char* file);
void debug_print (void) const;
};
LINT_DivByZero::LINT_DivByZero (const char* func, int line, const char* file)
{
module = file;
function = func;
lineno = line;
argno = 0;
}
void LINT_DivByZero::debug_print (void) const
{
cerr << "LINT-Exception:" << endl;
cerr << "division by zero in function "
<< function << endl;
cerr << "module: " << module << ", line: "
<< lineno << endl;
}
For every type of error there exists such a class that like the example shown
here can be used with
throw LINT_DivByZero(function, line);
to report this particular error. Among others, the following subclasses of the base
class LINT_Error are defined:
class LINT_Base : public LINT_Error // invalid basis
{ ... };
class LINT_DivByZero : public LINT_Error // division by zero
{ ... };
class LINT_EMod : public LINT_Error // even modulus for mexpkm
{ ... };
class LINT_File : public LINT_Error // error with file I/O
{ ... };
class LINT_Heap : public LINT_Error // heap error with new
{ ... };
Search WWH ::




Custom Search