PoDoFo  0.9.5
Classes | Namespaces | Macros | Enumerations
PdfError.h File Reference
#include "podofoapi.h"
#include <string>
#include <queue>
#include <cstdarg>

Classes

class  PoDoFo::PdfError
 

Namespaces

 PoDoFo
 

Macros

#define PODOFO_RAISE_ERROR(x)   throw ::PoDoFo::PdfError( x, __FILE__, __LINE__ );
 
#define PODOFO_RAISE_ERROR_INFO(x, y)   throw ::PoDoFo::PdfError( x, __FILE__, __LINE__, y );
 
#define PODOFO_RAISE_LOGIC_IF(x, y)   { if (x) throw ::PoDoFo::PdfError( ePdfError_InternalLogic, __FILE__, __LINE__, y ); };
 

Enumerations

enum  PoDoFo::EPdfError {
  PoDoFo::ePdfError_ErrOk = 0, PoDoFo::ePdfError_TestFailed, PoDoFo::ePdfError_InvalidHandle, PoDoFo::ePdfError_FileNotFound,
  PoDoFo::ePdfError_InvalidDeviceOperation, PoDoFo::ePdfError_UnexpectedEOF, PoDoFo::ePdfError_OutOfMemory, PoDoFo::ePdfError_ValueOutOfRange,
  PoDoFo::ePdfError_InternalLogic, PoDoFo::ePdfError_InvalidEnumValue, PoDoFo::ePdfError_BrokenFile, PoDoFo::ePdfError_PageNotFound,
  PoDoFo::ePdfError_NoPdfFile, PoDoFo::ePdfError_NoXRef, PoDoFo::ePdfError_NoTrailer, PoDoFo::ePdfError_NoNumber,
  PoDoFo::ePdfError_NoObject, PoDoFo::ePdfError_NoEOFToken, PoDoFo::ePdfError_InvalidTrailerSize, PoDoFo::ePdfError_InvalidLinearization,
  PoDoFo::ePdfError_InvalidDataType, PoDoFo::ePdfError_InvalidXRef, PoDoFo::ePdfError_InvalidXRefStream, PoDoFo::ePdfError_InvalidXRefType,
  PoDoFo::ePdfError_InvalidPredictor, PoDoFo::ePdfError_InvalidStrokeStyle, PoDoFo::ePdfError_InvalidHexString, PoDoFo::ePdfError_InvalidStream,
  PoDoFo::ePdfError_InvalidStreamLength, PoDoFo::ePdfError_InvalidKey, PoDoFo::ePdfError_InvalidName, PoDoFo::ePdfError_InvalidEncryptionDict,
  PoDoFo::ePdfError_InvalidPassword, PoDoFo::ePdfError_InvalidFontFile, PoDoFo::ePdfError_InvalidContentStream, PoDoFo::ePdfError_UnsupportedFilter,
  PoDoFo::ePdfError_UnsupportedFontFormat, PoDoFo::ePdfError_ActionAlreadyPresent, PoDoFo::ePdfError_WrongDestinationType, PoDoFo::ePdfError_MissingEndStream,
  PoDoFo::ePdfError_Date, PoDoFo::ePdfError_Flate, PoDoFo::ePdfError_FreeType, PoDoFo::ePdfError_SignatureError,
  PoDoFo::ePdfError_MutexError, PoDoFo::ePdfError_UnsupportedImageFormat, PoDoFo::ePdfError_CannotConvertColor, PoDoFo::ePdfError_NotImplemented,
  PoDoFo::ePdfError_DestinationAlreadyPresent, PoDoFo::ePdfError_ChangeOnImmutable, PoDoFo::ePdfError_NotCompiled, PoDoFo::ePdfError_OutlineItemAlreadyPresent,
  PoDoFo::ePdfError_NotLoadedForUpdate, PoDoFo::ePdfError_CannotEncryptedForUpdate, PoDoFo::ePdfError_Unknown = 0xffff
}
 
enum  PoDoFo::ELogSeverity {
  PoDoFo::eLogSeverity_Critical, PoDoFo::eLogSeverity_Error, PoDoFo::eLogSeverity_Warning, PoDoFo::eLogSeverity_Information,
  PoDoFo::eLogSeverity_Debug, PoDoFo::eLogSeverity_None, PoDoFo::eLogSeverity_Unknown = 0xffff
}
 

Detailed Description

Error information and logging is implemented in this file.

Macro Definition Documentation

◆ PODOFO_RAISE_ERROR

#define PODOFO_RAISE_ERROR (   x)    throw ::PoDoFo::PdfError( x, __FILE__, __LINE__ );

Set the value of the variable eCode (which has to exist in the current function) to x and return the eCode.

◆ PODOFO_RAISE_ERROR_INFO

#define PODOFO_RAISE_ERROR_INFO (   x,
 
)    throw ::PoDoFo::PdfError( x, __FILE__, __LINE__, y );

Set the value of the variable eCode (which has to exist in the current function) to x and return the eCode. Additionally additional information on the error y is set. y can be a C string, but can also be a C++ std::string.

◆ PODOFO_RAISE_LOGIC_IF

#define PODOFO_RAISE_LOGIC_IF (   x,
 
)    { if (x) throw ::PoDoFo::PdfError( ePdfError_InternalLogic, __FILE__, __LINE__, y ); };

Evaluate ‘x’ as a binary predicate and if it is true, raise a logic error with the info string ‘y’ .