implemented error handlers per procedure's code