다음과 같이 rails 컨트롤러에서 포착되지 않은 모든 예외를 포착하는 방법이 있습니까?
def delete
schedule_id = params[:scheduleId]
begin
Schedules.delete(schedule_id)
rescue ActiveRecord::RecordNotFound
render :json => "record not found"
rescue ActiveRecord::CatchAll
#Only comes in here if nothing else catches the error
end
render :json => "ok"
end
감사합니다