libStatGen Software 1
|
The SamValidationError class describes a validation error that occured, containing the error type, severity, and textual error message. More...
#include <SamValidation.h>
Public Types | |
enum | Severity { WARNING , ERROR } |
Severity of the error. More... | |
enum | Type { INVALID_QNAME , INVALID_REF_ID , INVALID_RNAME , INVALID_POS , INVALID_MAPQ , INVALID_CIGAR , INVALID_MRNM , INVALID_QUAL , INVALID_TAG } |
Type of the error. More... | |
Public Member Functions | |
SamValidationError (Type type, Severity severity, std::string Message) | |
Constructor that sets the type, severity, and message for the validation error. More... | |
Type | getType () const |
Return the type enum of this validation error object. More... | |
Severity | getSeverity () const |
Return the severity enum of this validation error object. More... | |
const char * | getMessage () const |
Return the error message of this validation error object. More... | |
const char * | getTypeString () const |
Return the string representing this object's type of validation error. More... | |
const char * | getSeverityString () const |
Return the string representing this object's severity of validation error. More... | |
void | getErrorString (std::string &errorString) const |
Get the error string representing this object's error. More... | |
void | printError () const |
Print a formatted output of the error to cerr. More... | |
Static Public Member Functions | |
static const char * | getTypeString (Type type) |
Get the string representing the specified type of validation error. More... | |
The SamValidationError class describes a validation error that occured, containing the error type, severity, and textual error message.
Definition at line 34 of file SamValidation.h.
Severity of the error.
Enumerator | |
---|---|
WARNING | Warning is used if it is just an invalid value. |
ERROR | Error is used if parsing could not succeed. |
Definition at line 38 of file SamValidation.h.
Type of the error.
TODO: NOT ALL INVALID TYPES HAVE BEEN ADDED SINCE NOT ALL VALIDATION IS COMPLETE YET
Definition at line 47 of file SamValidation.h.
Constructor that sets the type, severity, and message for the validation error.
Definition at line 45 of file SamValidation.cpp.
References SamValidationError().
Referenced by SamValidationError().
void SamValidationError::getErrorString | ( | std::string & | errorString | ) | const |
Get the error string representing this object's error.
Definition at line 84 of file SamValidation.cpp.
References getMessage(), getSeverityString(), and getTypeString().
const char * SamValidationError::getMessage | ( | ) | const |
Return the error message of this validation error object.
Definition at line 66 of file SamValidation.cpp.
Referenced by getErrorString().
SamValidationError::Severity SamValidationError::getSeverity | ( | ) | const |
Return the severity enum of this validation error object.
Definition at line 60 of file SamValidation.cpp.
const char * SamValidationError::getSeverityString | ( | ) | const |
Return the string representing this object's severity of validation error.
Definition at line 78 of file SamValidation.cpp.
Referenced by getErrorString().
SamValidationError::Type SamValidationError::getType | ( | ) | const |
Return the type enum of this validation error object.
Definition at line 54 of file SamValidation.cpp.
const char * SamValidationError::getTypeString | ( | ) | const |
Return the string representing this object's type of validation error.
Definition at line 72 of file SamValidation.cpp.
Referenced by getErrorString().
|
static |
Get the string representing the specified type of validation error.
Definition at line 39 of file SamValidation.cpp.
void SamValidationError::printError | ( | ) | const |
Print a formatted output of the error to cerr.
Definition at line 95 of file SamValidation.cpp.