15. Handle Errors in a Mod

In This Chapter

Respond to exceptions in your Java programs

Create methods that ignore an exception

Use methods that cause exceptions

Create your own exceptions

Errors—the bugs, blunders, and typos that prevent a program from running correctly—are a natural part of the software development process. “Natural” is probably the kindest word that has ever been used to describe them.

Some errors are flagged by the compiler and prevent you from creating a class. Others are noted by the interpreter in response to a problem that keeps it from running successfully. Java divided errors into two categories:

Exceptions—Events that signal an unusual circumstance has taken place as a program runs

Errors—Events that signal ...

Get Absolute Beginner’s Guide to Minecraft® Mods Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.