make exception handling for oil generic