forked from politza/pdf-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//======================================================================== | ||
// | ||
// Error.h | ||
// | ||
// Copyright 1996-2003 Glyph & Cog, LLC | ||
// | ||
//======================================================================== | ||
|
||
//======================================================================== | ||
// | ||
// Modified under the Poppler project - http://poppler.freedesktop.org | ||
// | ||
// All changes made under the Poppler project to this file are licensed | ||
// under GPL version 2 or later | ||
// | ||
// Copyright (C) 2005, 2007 Jeff Muizelaar <[email protected]> | ||
// Copyright (C) 2005 Albert Astals Cid <[email protected]> | ||
// Copyright (C) 2005 Kristian Høgsberg <[email protected]> | ||
// Copyright (C) 2013 Adrian Johnson <[email protected]> | ||
// | ||
// To see a description of the changes please see the Changelog file that | ||
// came with your tarball or type make ChangeLog if you are building from git | ||
// | ||
//======================================================================== | ||
|
||
#ifndef ERROR_H | ||
#define ERROR_H | ||
|
||
#ifdef USE_GCC_PRAGMAS | ||
#pragma interface | ||
#endif | ||
|
||
#include <stdarg.h> | ||
#include "poppler-config.h" | ||
#include "goo/gtypes.h" | ||
|
||
enum ErrorCategory { | ||
errSyntaxWarning, // PDF syntax error which can be worked around; | ||
// output will probably be correct | ||
errSyntaxError, // PDF syntax error which can be worked around; | ||
// output will probably be incorrect | ||
errConfig, // error in Xpdf config info (xpdfrc file, etc.) | ||
errCommandLine, // error in user-supplied parameters, action not | ||
// allowed, etc. (only used by command-line tools) | ||
errIO, // error in file I/O | ||
errNotAllowed, // action not allowed by PDF permission bits | ||
errUnimplemented, // unimplemented PDF feature - display will be | ||
// incorrect | ||
errInternal // internal error - malfunction within the Xpdf code | ||
}; | ||
|
||
typedef enum ErrorCategory ErrorCategory; | ||
extern void setErrorCallback(void (*cbk)(void *data, ErrorCategory category, | ||
Goffset pos, char *msg), | ||
void *data); | ||
|
||
extern void CDECL error(ErrorCategory category, Goffset pos, const char *msg, ...); | ||
|
||
#endif |