[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pdf-devel] Error management in type 4 functions
From: |
David Vazquez |
Subject: |
Re: [pdf-devel] Error management in type 4 functions |
Date: |
Wed, 04 Feb 2009 23:08:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Well, I tell you points of the task description.
On the one hand, we need a list of syntax errors and a way to
report them in `pdf_fp_func_4_new'. I think that a PDF_BADSYNTAX
return value would works fine. But if more defailed errors are
required, an extra argument is valid. Anyway, the syntax
constructions in the language are `if' and 'ifelse'. They seem
like:
{ ... } if
{ ... } { ... } ifelse
Indeed, whole PostScript code should be wrapped with braces
too. So, we could report bad balanced braces and missing { ... }
construct.
On the other hand, we can use the same way to report errors to caller
from `pdf_fp_func_eval'. In this case, we suggest the following generic
interpretation errors:
- Bad number of inputs
- Bad number of outputs
- Math error
- Internal error
Math error consists of division-by-zero, negative square root, etc,
and internal error would be arised, for example, when the stack of
a type 4 function overflows.
Regards,
David.