summaryrefslogtreecommitdiff
path: root/source/fitz/error.c
AgeCommit message (Collapse)Author
2017-01-17Remove preprocessor defines from vcproj.Tor Andersson
Keeping them up to date is difficult and prone to errors, so we move setting the USE_OUTPUT_DEBUG_STRING and FZ_LARGEFILE flags to the source instead of relying on project file definitions.
2016-09-14Redirect fprintf to android logcat in debug builds.Robin Watts
This makes debugging much simpler.
2016-07-12Zero terminate fz_vsnprintf output when formatting warnings and error messages.Tor Andersson
Fix for bug 696913.
2016-07-08git stripspaceTor Andersson
2016-07-08Use fz_vsnprintf to format warnings and error messages.Tor Andersson
2016-05-12Add variadic versions of fz_throw and fz_warn.Simon Reinhardt
2016-04-27Fix 696649: remove fz_rethrow_message calls.Tor Andersson
2016-03-15Tweak fz_try/catch to fix overflow case.Robin Watts
In the current code, when we hit the fz_try(), we check to see if we are about to overflow the exception stack. If we are, we throw. This does NOT throw to the fz_catch following the try, but rather to the enclosing fz_always/fz_catch blocks. This can cause leaks, as it's very hard to code correctly. It would be a far nicer behaviour to have a failure in fz_try() cause us to throw to the immediately following fz_always/fz_catch. This commit achieves that.
2016-02-15Drop UNUSED macro -- it dirties the namespace and is not needed.Tor Andersson
We compile with -Wno-unused-parameters instead.
2016-01-18Simplify try/catch macros.Tor Andersson
Use a pointer to the top error stack slot instead of access via array and index. Return the stack slot from fz_push_try.
2015-10-29Fix 696303: Off-by-one error when checking for exception stack overflow.Tor Andersson
2015-09-30Bug 696115: Further fix for setjmp/longjmp.Robin Watts
Tor turned up an interesting section in the C spec about this. See page 275 of http://open-std.org/jtc1/sc22/wg14/www/docs/n1494.pdf regarding acceptable places for setjmp to occur. It seems that: if (setjmp(buf)) if (!setjmp(buf)) if (setjmp(buf) {==,!=,<,>} <integer constant>) etc are all valid things to do, but assignments (and subsequent testing of values) like: if ((code = setjmp(buf)) == 0) are not allowed. Further, it's not even clear that: if (a() && setjmp(buf)) is permissible. We therefore recast the macros into the form: a(); if (setjmp((buf)) == 0) which should be acceptable under the C spec. To keep try atomic, we introduce a block '{{{' around this, along with a matching close block '}}}' in the catch clause. This has the nifty extra effect of giving us a compile time error if we mismatch our try/catches.
2014-09-09test-device: Abort interpretation when color found.Robin Watts
Add a new class of errors and use them to abort interpretation when the test device detects a color page.
2014-08-19don't always write to Visual Studio's Output console in debug buildsSimon Bünzli
We build MuPDF without NDEBUG defined in order to check assertions but don't want Visual Studio's Output console flooded with warnings for broken documents. So instead of always defining USE_OUTPUT_DEBUG_STRING for debug builds under Windows, allow the VS solutions to define it when desired and to omit it when not.
2013-08-28fix various typosSimon Bünzli
2013-07-19Initial work on progressive loadingRobin Watts
We are testing this using a new -p flag to mupdf that sets a bitrate at which data will appear to arrive progressively as time goes on. For example: mupdf -p 102400 pdf_reference17.pdf Details of the scheme used here are presented in docs/progressive.txt
2013-07-03Update fz_error/fz_warn to output to Debugger window on Win32 too.Robin Watts
Stupid windows debugger doesn't show stdout/stderr anywhere in non console apps, so add code to make errors/warnings visible.
2013-06-28Modify FZ_NORETURN to work on MSVC too.Robin Watts
We need to have it as a prefix, not a postfix now, but it should work on both gcc and MSVC now.
2013-06-20Rearrange source files.Tor Andersson