add .Error method to error struct

This commit is contained in:
amirrezaask 2020-12-05 13:37:04 +03:30
parent 472dc78e8c
commit b37afd25d4
1 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,10 @@ func (e *Error) ToDebugStr() string {
return e.msg
}
func (e *Error) Error() string {
return e.msg
}
func MakeError(rt *Runtime, msg string) IError {
return &Error{
msg: msg,