Le 31/08/2016 à 17:55, Scott Kostyshak a écrit :
On Wed, Aug 31, 2016 at 12:24:32PM -0400, Richard Heck wrote:
On 08/31/2016 12:16 PM, Scott Kostyshak wrote:
I'm trying to make a patch for #10188, which has to do with the fact
that in some cases LyX GUI gives an error but lyx -e does not exit with
non-zero exit code. At first it seemed more reasonable to change the
latex() method to return a bool indicating if exporting to LaTeX had an
error. I started doing this, and don't have much work left I think to
finish. But then looking at Buffer::makeLaTeXFile() there is a lot of
catching of exceptions there, so perhaps I should follow what is done
and throw an exception instead of doing surgery on the return type.

Any thoughts?

I'm not opposed to using an exception here, and did so in a lot of the
XHTML code. It makes it
a lot easier if you're deep in some set of nested calls.

Yes this situation does involve some deep nesting of calls.


Hi Scott,

Sounds good to me (and if there are caveats I am not aware of regarding exceptions in LyX, I would be curious to know). But if you end up using an error code instead of an exception, I may suggest that you use an enum instead of bool, so that it is self-documenting and extensible.

Guillaume

Reply via email to