Cloning: the default choice is a deep copy (although be aware of memory usage). Common options for handling errors: * Close program * Throw exception * Use a reasonable or neutral value * Log the error * Print the error * Do nothing [* Use an assert if you want an error thrown, but only during development] Example of an assert (in Java, assertions are enabled by running it with the -ea flag) lat = ... //calculation happens here //We want an error thrown if it's out of bounds, but only during development assert (lat >= -90 && lat <= 90) : "Latitude out of bounds"; if (lat > 90) lat = 90; if (lat < -90) lat = -90;