Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignoring (serious) errors to keep the program alive?

One of the main things I wanted to achieve in my experimental programming language was: When errors occur (Syntax, Name, Type, etc.) keep the program running, no matter how serious or devastating it is. I know that this is probably very bad, but I just wanted something that doesn't kill itself on every error - I find it interesting what happens when a serious error occurs but the program continues.

  • Does this "paradigm" have a name? I mean expect for
  • How bad is it to do the above?
  • Are there programs in use out there that just follow: "Hey, this is a fatal, unexpected error - but you know what? I don't care!"?
like image 489
SQuirreL bites Avatar asked Apr 26 '10 16:04

SQuirreL bites


People also ask

What type of error prevents the program from running?

Runtime or Execution Errors They may cause a program to not execute properly or even not run at all. Fatal runtime errors cause program execution to stop while the non-fatal ones cause execution to finish, but with incorrect results. A typical runtime error is a division by zero error.

What are the 3 types of programming errors?

When developing programs there are three types of error that can occur: syntax errors. logic errors. runtime errors.

What is an error in a computer program called?

A software bug is an error, flaw or fault in the design, development, or operation of computer software that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.

Which errors must be corrected before a program can be executed?

Syntax errors: Errors that occur when you violate the rules of writing C/C++ syntax are known as syntax errors. This compiler error indicates something that must be fixed before the code can be compiled. All these errors are detected by compiler and thus are known as compile-time errors.


1 Answers

On the naming, you could say the language exhibits "pig-headedness".

Crashing is normally prefered, because programs should not return unpredictable and unrepeatable results. No result is generally better than an unreliable one, especially if you are doing something business critical. For example, it's better that a customer's order on Amazon is not processed (they can always re-submit it) than for the customer to be delivered a random product. Some errors are truely unrecoverable, for example if the instruction pointer is corrupted.

You can implement similar bahaviour in most modern languages with catch all exception handlers.

like image 192
MichaelB76 Avatar answered Nov 01 '22 18:11

MichaelB76