mirror of
https://github.com/ditkrg/workflower.git
synced 2026-01-22 22:26:40 +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)
|
@calling_model.assign_attributes flow.updateable_attributes(@calling_model)
|
||||||
flow.call_after_transition(@calling_model)
|
flow.call_after_transition(@calling_model)
|
||||||
true
|
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)
|
@calling_model.errors.add(@calling_model.workflower_state_column_name, :transition_faild)
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user