Code refractory for Errors

Code refractory for Errors