diff options
Diffstat (limited to 'lib/psych/exception.rb')
-rw-r--r-- | lib/psych/exception.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/psych/exception.rb b/lib/psych/exception.rb index f473b95..04a9a90 100644 --- a/lib/psych/exception.rb +++ b/lib/psych/exception.rb @@ -6,6 +6,13 @@ module Psych class BadAlias < Exception end + # Subclasses `BadAlias` for backwards compatibility + class AliasesNotEnabled < BadAlias + def initialize + super "Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`." + end + end + class DisallowedClass < Exception def initialize action, klass_name super "Tried to #{action} unspecified class: #{klass_name}" |