mirror of
https://github.com/ditkrg/workflower.git
synced 2026-01-22 14:17:11 +00:00
Enhance error handling in manager.rb by logging error messages and classes during transition failures
This commit is contained in:
parent
5ccf764589
commit
94b23d46b7
@ -61,7 +61,9 @@ module Workflower
|
||||
@calling_model.assign_attributes flow.updateable_attributes(@calling_model)
|
||||
flow.call_after_transition(@calling_model)
|
||||
true
|
||||
rescue Exception
|
||||
rescue Exception => e
|
||||
puts "ERROR MESSAGE: #{e.message}"
|
||||
puts "ERROR CLASS: #{e}"
|
||||
@calling_model.errors.add(@calling_model.workflower_state_column_name, :transition_faild)
|
||||
false
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user