summaryrefslogtreecommitdiff
path: root/fitz/base_error.c
AgeCommit message (Collapse)Author
2012-08-23Silence some warnings.Robin Watts
Mountian Lion causes various different warnings to be given, possibly because a change to clang by default. Fix them here.
2012-08-07Remove fz_too_deeply_nested.Robin Watts
Rather than specifically checking for the nesting getting too deep and hence throwing an error, the error handling should do this for itself. Make it so that we spot the depth being too great in the fz_try() and throw to the fz_catch().
2012-08-06Throw exception on too deeply nested arrays/dictsSebastian Rasmussen
Previously we would run out of error stacks in the context and fail abruptly. Now, throw an exception and hope for the best. At least this plugs any memory leaks.
2012-03-06Split fitz.h/mupdf.h into internal/external headers.Robin Watts
Attempt to separate public API from internal functions.
2012-02-29On MacOS/iOS use _setjmp/_longjmp rather than setjmp/longjmp.Robin Watts
On Apple OSs setjmp/longjmp also mess with the signal handlers; we don't use signals, so we don't need the slowdown this causes. CLUSTER_UNTESTED as not tested on cluster.
2012-01-11Flush warnings before printing an error message in fz_throw.Tor Andersson
2012-01-09Update fz_try/fz_catch to be fz_try/{fz_always}/fz_catch.Robin Watts
Add explanations of how to use the macros in fitz.h. Also included are 2 different formulations, with different strengths/ weaknesses for reference. Will remove these shortly, but I want a reference to them in git. Workaround bug in Mac OS Lion gcc (clang works fine).
2012-01-09Fix Android logging bug; cut and paste error.Robin Watts
Thanks to Zeniko for pointing this out.
2012-01-06Android tweaks.Robin Watts
Include android headers in fitz.h so we can debug. Arrange for error throwing to output to android error stream as well as stderr. Change jpeg library to not use backing store. Solves bug 692473.
2011-12-08Stylistic changes when testing pointer values for NULL.Tor Andersson
Also: use 'cannot' instead of 'failed to' in error messages.
2011-12-08Remove deprecated error handling code.Tor Andersson
2011-12-08Move from volatile to fz_var.Robin Watts
When using exceptions (which are implemented using setjmp/longjmp), we need to be careful to ensure that variable values get written back before any exception happens. Previously we've done that using volatile, but that produces nasty warnings (and unduly limits the compilers freedom to optimise). Here we introduce a new macro fz_var that passes the address of the variable out of scope. This means that the compiler has to ensure that any changes to its value are written back to memory before calling any out of scope function.
2011-11-14Simplify fz_try/fz_catch by removing failed flag.Robin Watts
The failed flag can be removed by having the fz_throw (and fz_rethrow) functions do the popping of the stack.
2011-09-21Add warning context.Tor Andersson
2011-09-20Reshuffle exception context code to fit Tor's aesthetic sense.Tor Andersson
2011-09-14Initial import of exception handling codeRobin Watts
Import exception handling code from WSS, modified to fit into the fitz world. With this code we have 'real' fz_try/fz_catch/fz_rethrow functions, handling a fz_except type. We therefore rename the existing fz_throw/ fz_catch/fz_rethrow to be fz_error_make/fz_error_handle/fz_error_note. We don't actually use fz_try/fz_catch/fz_rethrow yet...
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-03-06Add error message buffer for GUI applications to display the latest error ↵Tor Andersson
stack trace.
2011-03-06Inhibit warning message spam by introducing a repeat counter.Tor Andersson
2010-07-08Simplify #ifdef labyrinth and make some source more c89 compatible.Tor Andersson
2010-05-14Remove prefix ascii art from error messages stored in the error text buffer.Tor Andersson
2009-12-03Consolidate include lines to a single fitz.h.Tor Andersson
2009-11-29Fix up indentation.Tor Andersson
2009-08-23Print the newline at the end of error messages separately from the snprintf, ↵Tor Andersson
since it may be trimmed off if the message is too long to fit the buffer.
2009-08-22Append newline to end of error messages.Sebastian Rasmussen
2009-08-21Save error messages in a static buffer so that the windows viewer can show ↵Tor Andersson
them in a dialog box.
2009-03-11Change fz_error* struct into an integer error type fz_error.Tor Andersson
2009-03-11Add fz_catch function, and cause the throw/rethrow/catch functions to print ↵Tor Andersson
the errors immediately.
2009-02-28Merge and move header files into the source directories.Tor Andersson
2009-02-28Moved Fitz files into one directory.Tor Andersson
2005-06-04new world orderTor Andersson
2005-03-30rename and shuffle -- part 2Tor Andersson