roxen.lists.pike.general

Subject Author Date
error handling Yvan Vander Sanden <yvan[at]youngmusic[dot]org> 02-09-2009
Hi.

I am using catch when running

program p = compile_file(filename);

for catching any error. This works, but i would also like to redirect the
messages about what is wrong with the file, like:

test.pike:12:Missing ')'.

This is printed to the console before i can print my error. It seems i need
need an error handler and add that to the compile_file methods.

But I can't get it done with the reference manual. Mainly, how do i make
such and object? just

object handler = CompilationHandler();

is obviously not correct. And the documentation lists several methods to
write to the handle, but none to retrieve the information from it.

Does anyone have a more concrete example of how to do this?

regards,

yvan

-- 
Copyright only exists in the imagination of those who do not have any.