using exceptions for critical runtime errors