japl/nim/types/exceptions.nim

9 lines
271 B
Nim
Raw Normal View History

import objecttype
2020-08-10 18:39:53 +02:00
type JAPLException* = ref object of Obj
2020-08-10 18:39:53 +02:00
func newTypeError*(message: string): JAPLException =
result = JAPLException(kind: ObjectTypes.EXCEPTION, errName: Obj(kind: STRING, str: "TypeError"), message: Obj(kind: ObjectTypes.STRING, str: message))