|Pliant talk forum
Discussion: On error messages
|Message posted by marcus on 2004/03/08 13:21:32
|As mentioned in a previous message, this semester I have been using Pliant in one
of my courses. There students are asked to implement a simplified JPEG encoding
of still images and an image viewer.
Overall, students have not complained a lot about the lack of documentation.
Their major complain regards the absence of error messages (I explain below) and
some 'execption 11' server crashes which did not come with the usual error report
normally output on the console when such exception occurs.
Regarding the 'abscense' of error messages, I've noticed that
if there is an error in a page called via execute_dynamic_page, the browser
does not present the error, it just shows a blank page.
Is it possible to fix that?
|Message posted by hubert.tonneau on 2004/03/08 13:43:13
|Yes: use virual_page.html in your URL. I mean access the .page as if it was
a standard web page instread of a virtual tree.
No error message when Pliant crashes will always be possible since in Pliant
the program, the datas, the debugger are all in a single process, so if the
program starts corrupting the memory, the debugger might not work.
Also with standard C, you don't get any better results in facts. I mean you
always get an error message and the stack trace, but they may well be
completely irrevelant to the bug. I mean if a faulty part of the program
starts to corrupt the memory, the C program will often crash much later, in
a sane part of the code which is disturbed by the memory corruption, so you
get a trace of the sane part of the code, which is useless.
The right way to proceed when you get no error message, or the error message
is not helpfull, is to try running your program at debugging level 2.
What extra help it will produce depends on how many and how well selected
'check' instructions are in the source code, so what you have to tell your
each time your program is assuming something on the input, use a 'check'
instruction to verify it,
and if your program is doing complex things, use some more 'check' instruction
to verify your own results.
Also when your progam is crashing, you may want to insert a 'memory_checkup'
instruction at the beginning of the suspicious part just to check that it
received a not too corrupted memory layout, so is not crashing as a result
of a previous memory corruption.
|Message posted by marcus on 2004/03/08 13:51:03
|> Yes: use virual_page.html in your URL. I mean access the .page as if it was
> a standard web page instread of a virtual tree.
You mean: suppose the .page files is called foo.page, and contains
If there is an error in test.page, Pliant wont show it if one provides the URL
To get the error message, one would need to provide the URL
|Message posted by hubert.tonneau on 2004/03/08 13:56:13