#include <error.h>
Public Member Functions | |
ErrorParam & | chr (uint32 c) |
ErrorParam & | code (int code) |
ErrorParam & | desc (const String &d) |
ErrorParam (int code, uint32 line=0) | |
Standard constructor. | |
ErrorParam & | extra (const String &e) |
ErrorParam & | hard () |
ErrorParam & | line (uint32 line) |
ErrorParam & | module (const String &mod) |
ErrorParam & | origin (t_origin orig) |
ErrorParam & | pc (uint32 pc) |
ErrorParam & | symbol (const String &sym) |
ErrorParam & | sysError (uint32 e) |
Friends | |
class | Error |
This class provides the main Error class and its subclasses with named parameter idiom. Errors have many parameters and their configuration is bourdensome and also a big "bloaty" exactly in spots when one would want code to be small.
This class, completely inlined, provides the compiler and the programmer with a fast and easy way to configure the needed parameters, preventing the other, unneded details from getting into the way of the coders.
The Error class (and its subclasses) has a constructor accepting an ErrorParameter by reference.
Error *e = new SomeKindOfError( ErrorParam( ... ).p1().p2()....pn() )
is an acceptable grammar to create an Error.
Falcon::ErrorParam::ErrorParam | ( | int | code, | |
uint32 | line = 0 | |||
) | [inline] |
Standard constructor.
In the constructor a source line may be provided. This makes possible to use the __LINE__ ansi C macro to indicate the point in the source C++ file where an error is raised.
code | error code. | |
line | optional line where error occurs. |
ErrorParam& Falcon::ErrorParam::chr | ( | uint32 | c | ) | [inline] |
ErrorParam& Falcon::ErrorParam::code | ( | int | code | ) | [inline] |
ErrorParam& Falcon::ErrorParam::desc | ( | const String & | d | ) | [inline] |
ErrorParam& Falcon::ErrorParam::extra | ( | const String & | e | ) | [inline] |
ErrorParam& Falcon::ErrorParam::hard | ( | ) | [inline] |
ErrorParam& Falcon::ErrorParam::line | ( | uint32 | line | ) | [inline] |
ErrorParam& Falcon::ErrorParam::module | ( | const String & | mod | ) | [inline] |
ErrorParam& Falcon::ErrorParam::origin | ( | t_origin | orig | ) | [inline] |
ErrorParam& Falcon::ErrorParam::pc | ( | uint32 | pc | ) | [inline] |
ErrorParam& Falcon::ErrorParam::symbol | ( | const String & | sym | ) | [inline] |
ErrorParam& Falcon::ErrorParam::sysError | ( | uint32 | e | ) | [inline] |
friend class Error [friend] |