PCL
|
Base class for exceptions thrown by parsing routines. More...
#include <Exception.h>
Public Member Functions | |
ParseError ()=default | |
ParseError (const ParseError &)=default | |
ParseError (const String &message, const String &beingParsed=String(), int errorPosition=-1) | |
String | Message () const override |
void | Show () const override |
Public Member Functions inherited from pcl::Error | |
Error ()=default | |
Error (const Error &)=default | |
Error (const String &message) | |
String | Caption () const override |
Public Member Functions inherited from pcl::Exception | |
Exception ()=default | |
Exception (const pcl::Exception &)=default | |
virtual | ~Exception () |
virtual String | ExceptionClass () const |
virtual String | FormatInfo () const |
PCL_FORCE_INLINE void | ShowOnConsole () const |
Additional Inherited Members | |
Static Public Member Functions inherited from pcl::Exception | |
static void | DisableConsoleOutput (bool disable=true) |
static void | DisableGUIOutput (bool disable=true) |
static void | EnableConsoleOutput (bool=true) |
static void | EnableGUIOutput (bool=true) |
static bool | IsConsoleOutputEnabled () |
static bool | IsGUIOutputEnabled () |
A ParseError indicates an syntactic or semantic error found while interpreting some code or trying to translate some text into an object.
For example, String and IsoString throw ParseError exceptions to indicate syntax errors while converting strings to numbers.
Definition at line 387 of file Exception.h.
|
default |
Constructs an empty ParseError object: no error message and no position information.
|
default |
Copy constructor.
|
inline |
Constructs a ParseError object.
message | The error message. HTML entities are not interpreted as ISO 8859-1 characters, and console tags are ignored, even if the exception is to be represented on a PixInsight console. HTML entities and console tags are always written literally. This limitation is necessary to ensure representativeness of source code fragments shown in exception messages. |
beingParsed | The string being parsed, or an empty string if the error is not associated to a particular source code string. |
errorPosition | The position >= 0 of the first offending character in the string beingParsed, or < 0 if no specific position can be associated with the error. |
Definition at line 419 of file Exception.h.
|
overridevirtual |
Returns descriptive information for this Error object. The default implementation returns the message specified upon construction. A derived class can reimplement this function to provide additional information items such as file names, object identifiers, source code positions, date and time representations, etc.
Reimplemented from pcl::Error.
|
overridevirtual |
Shows a representation of the information transported by this exception.
Exception information can be shown as text on the platform console or using graphical interfaces, depending on a global setting controlled with the EnableConsoleOutput() and EnableGUIOutput() static member functions.
Reimplemented from pcl::Exception.