Skip to content

Commit

Permalink
Add throw_rodauth_error method to make certain extensions easier (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
jf authored and jeremyevans committed Apr 27, 2024
1 parent 353c3d8 commit b44b441
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rodauth/features/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,13 @@ def set_response_error_reason_status(reason, status)
set_response_error_status(status)
end

def throw_rodauth_error
throw :rodauth_error
end

def throw_error(field, error)
set_field_error(field, error)
throw :rodauth_error
throw_rodauth_error
end

def throw_error_status(status, field, error)
Expand Down

0 comments on commit b44b441

Please sign in to comment.