What is the difference between throw exception and print error message?
Throw exception tells the program there is something wrong so the program can look after the problem caught. Meanwhile print error message tells user, the person who uses the program, that some special case (could be an error) had happend. It is only a way that the program deals with an exception. A program may have other ways to handle exceptions, e.g., tries the method call again if the exception was thrown because lack of resources.
Related Questions
- When trying to print reports, I get an error message "Cannot shift objects off sheet" or Cashflow Plan fails to hide columns in certain reports?
- When trying to print reports, I get an error message "Cannot shift objects off sheet" or Exl-Plan fails to hide columns in certain reports?
- What is the difference between throw exception and print error message?