mirror of
https://github.com/kanaka/mal.git
synced 2024-09-20 01:57:09 +03:00
23 lines
332 B
Crystal
23 lines
332 B
Crystal
module Mal
|
|
class ParseException < Exception
|
|
end
|
|
|
|
class EvalException < Exception
|
|
end
|
|
|
|
class RuntimeException < Exception
|
|
getter :thrown
|
|
def initialize(@thrown)
|
|
super()
|
|
end
|
|
end
|
|
end
|
|
|
|
def eval_error(msg)
|
|
raise Mal::EvalException.new msg
|
|
end
|
|
|
|
def parse_error(msg)
|
|
raise Mal::ParseException.new msg
|
|
end
|