#include <error.h>
Public Methods | |
ID3_Err | GetErrorID () const |
Returns the ID3_Err value, which represents the ID of the error that caused the exception. More... | |
const char * | GetErrorType () const |
Returns the English string that defines the error type. More... | |
const char * | GetErrorDesc () const |
Returns a string that gives more explanation as to what caused the exception, if enabled by the code that caused the exception. More... | |
const char * | GetErrorFile () const |
Returns a pointer to a string of characters that is the name of the id3lib source file that generated the exception. More... | |
size_t | GetErrorLine () const |
Returns the line number in the id3lib source file that threw the exception. More... | |
ID3_Error () | |
ID3_Error (ID3_Err, const char *, size_t, const char *) | |
Constructor. More... | |
ID3_Error (const ID3_Error &) | |
~ID3_Error () |
A function that calls an id3lib routine can place the call in a try block and provide an appropriate catch block.
try { // call some id3lib routine ID3_Tag myTag("mySong.mp3"); ID3_Frame *myFrame = NULL; // this will generate an exception myTag << myFrame; } catch (ID3_Error err) { // handle the error ... }
|
|
|
Constructor.
|
|
|
|
|
|
Returns a string that gives more explanation as to what caused the exception, if enabled by the code that caused the exception.
|
|
Returns a pointer to a string of characters that is the name of the id3lib source file that generated the exception. When submitting bug reports, it is useful to include the following.
cout << "Exception in file '" << err.GetErrorFile() << "'" << endl; |
|
Returns the ID3_Err value, which represents the ID of the error that caused the exception.
|
|
Returns the line number in the id3lib source file that threw the exception.
cout << "Line #" << err.GetErrorLine() << endl; |
|
Returns the English string that defines the error type. Each error ID has a set string error type. |