Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PdfError.h File Reference

#include "podofoapi.h"
#include <string>
#include <queue>
#include <cstdarg>

Namespaces

namespace  PoDoFo

Classes

class  PoDoFo::PdfError

Defines

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

Detailed Description

Error information and logging is implemented in this file.

Define Documentation

#define PODOFO_RAISE_ERROR  )     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.

#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 has to be an c-string.

#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' .

This macro will be undefined when NDEBUG is set, so it's compiled out for release builds. Use it for expensive or extremely frequent sanity checking.

We define it then UNDEF it to help out doxygen.


Enumeration Type Documentation

enum ELogSeverity
 

Used in PdfError::LogMessage to specify the log level.

See also:
PdfError::LogMessage
Enumeration values:
eLogSeverity_Critical  Critical unexpected error
eLogSeverity_Error  Error
eLogSeverity_Warning  Warning
eLogSeverity_Information  Information message
eLogSeverity_Debug  Debug information
eLogSeverity_None  No specified level
eLogSeverity_Unknown  Unknown log level

enum EPdfError
 

Error Code defines which are used in PdfError to describe the error.

If you add an error code to this enum, please also add it to PdfError::ErrorName and PdfError::ErrorMessage.

See also:
PdfError
Enumeration values:
ePdfError_ErrOk  The default value indicating no error.
ePdfError_TestFailed  Used in PoDoFo tests, to indicate that a test failed for some reason.
ePdfError_InvalidHandle  Null pointer was passed, but null pointer is not allowed.
ePdfError_FileNotFound  A file was not found or cannot be opened.
ePdfError_InvalidDeviceOperation  Tried to do something unsupported to an I/O device like seek a non-seekable input device
ePdfError_UnexpectedEOF  End of file was reached but data was expected.
ePdfError_OutOfMemory  Not enough memory to complete an operation.
ePdfError_ValueOutOfRange  The specified memory is out of the allowed range.
ePdfError_InternalLogic  An internal sanity check or assertion failed.
ePdfError_InvalidEnumValue  An invalid enum value was specified.
ePdfError_PageNotFound  The requested page could not be found in the PDF.
ePdfError_NoPdfFile  The file is no PDF file.
ePdfError_NoXRef  The PDF file has no or an invalid XRef table.
ePdfError_NoTrailer  The PDF file has no or an invalid trailer.
ePdfError_NoNumber  A number was expected in the PDF file, but the read string is no number.
ePdfError_NoObject  A object was expected and non was found.
ePdfError_NoEOFToken  The PDF file has no or an invalid EOF marker.
ePdfError_InvalidTrailerSize  The trailer size is invalid.
ePdfError_InvalidLinearization  The linearization directory of a web-optimized PDF file is invalid.
ePdfError_InvalidDataType  The passed datatype is invalid or was not recognized
ePdfError_InvalidXRef  The XRef table is invalid
ePdfError_InvalidXRefStream  A XRef steam is invalid
ePdfError_InvalidXRefType  The XRef type is invalid or was not found
ePdfError_InvalidPredictor  Invalid or unimplemented predictor
ePdfError_InvalidStrokeStyle  Invalid stroke style during drawing
ePdfError_InvalidHexString  Invalid hex string
ePdfError_InvalidStream  The stream is invalid
ePdfError_InvalidStreamLength  The stream length is invlaid
ePdfError_InvalidKey  The specified key is invalid
ePdfError_InvalidName  The specified Name is not valid in this context
ePdfError_InvalidEncryptionDict  The encryption dictionary is invalid or misses a required key
ePdfError_InvalidPassword  The password used to open the PDF file was invalid
ePdfError_InvalidFontFile  The font file is invalid
ePdfError_InvalidContentStream  The content stream is invalid due to mismatched context pairing or other problems
ePdfError_UnsupportedFilter  The requested filter is not yet implemented.
ePdfError_UnsupportedFontFormat  This font format is not supported by PoDoFO.
ePdfError_ActionAlreadyPresent  An Action was already present when trying to add a Destination
ePdfError_WrongDestinationType  The requested field is not available for the given destination type
ePdfError_MissingEndStream  The required token endstream was not found.
ePdfError_Date  Date/time error
ePdfError_Flate  Error in zlib
ePdfError_FreeType  Error in FreeType
ePdfError_SignatureError  Error in signature
ePdfError_MutexError  Error during a mutex operation
ePdfError_UnsupportedImageFormat  This image format is not supported by PoDoFO.
ePdfError_CannotConvertColor  This color format cannot be converted.
ePdfError_NotImplemented  This feature is currently not implemented.
ePdfError_DestinationAlreadyPresent  An destination was already present when trying to add a Action
ePdfError_ChangeOnImmutable  Changing values on immutable objects is not allowed.
ePdfError_Unknown  Unknown error


Generated on Sun Feb 12 13:19:18 2012 for PoDoFo by  doxygen 1.3.9.1