changed exception to errorg