![]() When an exception is thrown, it bubbles up the call stack. It reaches main and thus you have an unhandled exception. What happens if we don’t catch an exception? If you want to handle an exception, you’d use a try-catch block. ![]() What happens if an exception is not caught? If an exception is not caught (with a catch block), the runtime system will abort the program (i.e. ![]() crash) and an exception message will print to the console. What happens if there is an unhandled exception?Īn exception is a known type of error.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |