libCZI
Reading and Writing CZI documents made easy
libCZI::LibCZIStringParseException Class Reference

Exception for signaling that a string did not parse correctly. More...

#include <libCZI_exceptions.h>

Inheritance diagram for libCZI::LibCZIStringParseException:
libCZI::LibCZIException

Public Types

enum class  ErrorType { InvalidSyntax , DuplicateDimension , FromGreaterThanTo , Unspecified }
 Values that represent error types. More...
 

Public Member Functions

 LibCZIStringParseException (const char *szErrMsg, int numberOfCharsParsedOk, ErrorType errorType)
 
ErrorType GetErrorType () const
 
int GetNumberOfCharsParsedOk () const
 
- Public Member Functions inherited from libCZI::LibCZIException
 LibCZIException (const char *szErrMsg)
 

Detailed Description

Exception for signaling that a string did not parse correctly.

Member Enumeration Documentation

◆ ErrorType

Values that represent error types.

Enumerator
InvalidSyntax 

The string parsed has an invalid syntax.

DuplicateDimension 

When parsing a string representation of a coordinate, it was detected, that a dimension occurred more than once.

FromGreaterThanTo 

A range was parsed, and the start value is bigger than the end value.

Unspecified 

General error.

Constructor & Destructor Documentation

◆ LibCZIStringParseException()

libCZI::LibCZIStringParseException::LibCZIStringParseException ( const char *  szErrMsg,
int  numberOfCharsParsedOk,
ErrorType  errorType 
)
inline

Constructor for the LibCZIStringParseException. This type is used to signal that a string did not parse correctly.

Parameters
szErrMsgMessage describing the error.
numberOfCharsParsedOkNumber of characters parsed ok. The parse error occurred after this position. If negative, then this information is not available.
errorTypeType of the error.

Member Function Documentation

◆ GetErrorType()

ErrorType libCZI::LibCZIStringParseException::GetErrorType ( ) const
inline

Gets error type.

Returns
The error type.

◆ GetNumberOfCharsParsedOk()

int libCZI::LibCZIStringParseException::GetNumberOfCharsParsedOk ( ) const
inline

Gets number of characters that parsed correctly. The parse error occurred after this position. If this number is negative, then this information is not available and valid.

Returns
The number of characters parsed that parsed correctly. If the number is negative, this information is not available.

The documentation for this class was generated from the following file: