MovingBlocks
DestSol - Better Exceptions
Currently, Exceptions in Destination Sol are not so great. The goal of this task is to end up with descriptive, cohesive error messages. One prime example is in Gun.java
. The load
method in the Config
class has the potential to throw an IllegalArgumentException
. This exception can be handled and a more expressive exception can be thrown.
Where to Start
- Look at line #107 in
HullConfigManager.java
. This is the proper way to handle an exception when loading JSON - JSON loading methods are used in
ItemManager.java
- Searching for "throw new" in the code base will turn up errors that have no message, this is bad because the programmer has no immediate hint at what happened. Figure out why the exception would be thrown and add an appropriate message.
- Fix the grammar in the
SolException
uses - See if you can replace some of the
RuntimeExceptions
with exceptions that better express the problem
Definition of 'Done'
- 2-3 JSON loaders handled AND/OR a few
RuntimeExceptions
swapped for better exceptions SolException
grammar and clarity fixed- At least one empty exception that's been filled in
- A PR against MovingBlocks:develop with all your changes
Task tags
Students who completed this task
nateschnitzer, NicholasBatesNZ