diff --git a/lib/awesome_nested_set/move.rb b/lib/awesome_nested_set/move.rb index 01d783bf..ccf674b9 100644 --- a/lib/awesome_nested_set/move.rb +++ b/lib/awesome_nested_set/move.rb @@ -129,7 +129,9 @@ class ImpossibleMove < ActiveRecord::StatementInvalid def prevent_impossible_move if !root && !instance.move_possible?(target) - raise ImpossibleMove, "Impossible move, target node cannot be inside moved tree." + error_msg = "Impossible move, target node (#{target.class.name},ID: #{target.id}) + cannot be inside moved tree (#{instance.class.name},ID: #{instance.id})." + raise ImpossibleMove, error_msg end end