2020-08-13 23:39:26 +02:00
|
|
|
import objecttype
|
2020-08-10 18:39:53 +02:00
|
|
|
|
2020-08-13 23:39:26 +02:00
|
|
|
type JAPLException* = ref object of Obj
|
2020-08-10 18:39:53 +02:00
|
|
|
|
|
|
|
|
2020-08-13 23:39:26 +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))
|
2020-08-14 10:02:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
func newIndexError*(message: string): JAPLException =
|
|
|
|
result = JAPLException(kind: ObjectTypes.EXCEPTION, errName: Obj(kind: STRING, str: "IndexError"), message: Obj(kind: ObjectTypes.STRING, str: message))
|
|
|
|
|