1# 2# Error messages and exception class 3# 4 5module YAML 6 7 # 8 # Error messages 9 # 10 11 ERROR_NO_HEADER_NODE = "With UseHeader=false, the node Array or Hash must have elements" 12 ERROR_NEED_HEADER = "With UseHeader=false, the node must be an Array or Hash" 13 ERROR_BAD_EXPLICIT = "Unsupported explicit transfer: '%s'" 14 ERROR_MANY_EXPLICIT = "More than one explicit transfer" 15 ERROR_MANY_IMPLICIT = "More than one implicit request" 16 ERROR_NO_ANCHOR = "No anchor for alias '%s'" 17 ERROR_BAD_ANCHOR = "Invalid anchor: %s" 18 ERROR_MANY_ANCHOR = "More than one anchor" 19 ERROR_ANCHOR_ALIAS = "Can't define both an anchor and an alias" 20 ERROR_BAD_ALIAS = "Invalid alias: %s" 21 ERROR_MANY_ALIAS = "More than one alias" 22 ERROR_ZERO_INDENT = "Can't use zero as an indentation width" 23 ERROR_UNSUPPORTED_VERSION = "This release of YAML.rb does not support YAML version %s" 24 ERROR_UNSUPPORTED_ENCODING = "Attempt to use unsupported encoding: %s" 25 26 # 27 # YAML Error classes 28 # 29 30 class Error < StandardError; end 31 class ParseError < Error; end 32 class TypeError < StandardError; end 33 34end 35