Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What happens when an exception is not catched?

catched exception happens
0
Posted

What happens when an exception is not catched?

0

When an EXCEPTION is not catched the program is terminated and the hi interpreter writes a stack trace: *** Uncaught EXCEPTION NUMERIC_ERROR raised with {integer: *NULL_ENTITY_OBJECT* div fuel_max } Stack: in {(val integer param) div (val integer param) } at seed7_05.s7i(557) in init_display at lander.sd7(838) in setup at lander.sd7(907) in main at lander.sd7(1539) This stack trace shows that a ‘div’ operation causes a ‘NUMERIC_ERROR’ (probably a division by zero) in line 838 of the file “lander.sd7”. A short examination in “lander.sd7” shows that an assignment to ‘fuel_max’ was commented out to show how stack traces work. A compiled program creates a much shorter crash message: *** Uncaught EXCEPTION NUMERIC_ERROR raised at tmp_lander.c(698) In this case the mentioned file name and line number refers to the temporary C file or the Seed7 runtime library. To get useful information there are two possibilities: • Start the program in the interpreter instead. • Compile the program with the

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123