More sensible exception throwing and catching.