Exception: RSTError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rsyntaxtree.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg = "Error: something unexpected occurred") ⇒ RSTError

Returns a new instance of RSTError.



55
56
57
58
59
60
# File 'lib/rsyntaxtree.rb', line 55

def initialize(msg = "Error: something unexpected occurred")
  # Non-destructive: every file here carries frozen_string_literal, so
  # mutating the message in place turned a raise with a plain literal into
  # a FrozenError from inside the error class itself.
  super(msg.gsub(WHITESPACE_BLOCK, "<>"))
end