1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 02:27:10 +03:00
mal/crystal/error.cr
2018-10-29 18:20:02 -05:00

26 lines
359 B
Crystal

require "./types"
module Mal
class ParseException < Exception
end
class EvalException < Exception
end
class RuntimeException < Exception
getter :thrown
def initialize(@thrown : Type)
super()
end
end
end
def eval_error(msg)
raise Mal::EvalException.new msg
end
def parse_error(msg)
raise Mal::ParseException.new msg
end