changed variable name
fixed bug in exception classes where $code was being overwritten