diff --git a/clvm/core_ops.py b/clvm/core_ops.py index f4923cc9..850e5ce7 100644 --- a/clvm/core_ops.py +++ b/clvm/core_ops.py @@ -46,7 +46,10 @@ def op_listp(args: SExp): def op_raise(args: SExp): - raise EvalError("clvm raise", args) + if args.list_len() == 1 and not args.first().listp(): + raise EvalError("clvm raise", args.first()) + else: + raise EvalError("clvm raise", args) def op_eq(args: SExp): diff --git a/tests/brun/raise-1.txt b/tests/brun/raise-1.txt index ede040c6..aecdab87 100644 --- a/tests/brun/raise-1.txt +++ b/tests/brun/raise-1.txt @@ -1,2 +1,2 @@ brun -c '(x (q . 2000))' -FAIL: clvm raise (2000) +FAIL: clvm raise 2000 diff --git a/tests/brun/raise-2.txt b/tests/brun/raise-2.txt index ede040c6..aecdab87 100644 --- a/tests/brun/raise-2.txt +++ b/tests/brun/raise-2.txt @@ -1,2 +1,2 @@ brun -c '(x (q . 2000))' -FAIL: clvm raise (2000) +FAIL: clvm raise 2000 diff --git a/tests/brun/raise-list.txt b/tests/brun/raise-list.txt new file mode 100644 index 00000000..94a3046f --- /dev/null +++ b/tests/brun/raise-list.txt @@ -0,0 +1,2 @@ +brun '(x (q 99 101))' +FAIL: clvm raise ((99 101)) diff --git a/tests/brun/raise-many-args.txt b/tests/brun/raise-many-args.txt new file mode 100644 index 00000000..7e059a5c --- /dev/null +++ b/tests/brun/raise-many-args.txt @@ -0,0 +1,2 @@ +brun '(x (q . 99) (q . 101))' +FAIL: clvm raise (99 101) diff --git a/tests/brun/raise-single-atom.txt b/tests/brun/raise-single-atom.txt new file mode 100644 index 00000000..99a1cbc9 --- /dev/null +++ b/tests/brun/raise-single-atom.txt @@ -0,0 +1,2 @@ +brun '(x (q . 99))' +FAIL: clvm raise 99 diff --git a/tests/edge-cases/raise-02.txt b/tests/edge-cases/raise-02.txt index 881a7275..eb4f536f 100644 --- a/tests/edge-cases/raise-02.txt +++ b/tests/edge-cases/raise-02.txt @@ -1,2 +1,2 @@ brun -n '(x (q . 1))' -FAIL: clvm raise (1) +FAIL: clvm raise 1