Browse Source

fix: Better output for runtime errors

Matthias Ladkau 3 years ago
parent
commit
6d8aea2908

+ 2 - 2
cli/tool/debug_test.go

@@ -218,7 +218,7 @@ func TestDebugHandleInput(t *testing.T) {
 	}
 
 	if testTerm.out.String() != `1
-ECAL error in foo: 123 () (Line:1 Pos:1)
+ECAL error in foo (console input): 123 () (Line:1 Pos:1)
 ` {
 		t.Error("Unexpected result:", testTerm.out.String())
 		return
@@ -326,7 +326,7 @@ func TestDebugTelnetServer(t *testing.T) {
 	line = strings.TrimSpace(line)
 
 	if line != `{
-  "EncodedOutput": "RUNBTCBlcnJvciBpbiBmb286IDEyMyAoKSAoTGluZToxIFBvczoxKQo="
+  "EncodedOutput": "RUNBTCBlcnJvciBpbiBmb28gKGNvbnNvbGUgaW5wdXQpOiAxMjMgKCkgKExpbmU6MSBQb3M6MSkK"
 }` {
 		t.Error("Unexpected output:", line)
 		return

+ 1 - 1
cli/tool/interpret_test.go

@@ -380,7 +380,7 @@ func TestHandleInput(t *testing.T) {
 	}
 
 	if testTerm.out.String() != `1
-ECAL error in foo: 123 () (Line:1 Pos:1)
+ECAL error in foo (console input): 123 () (Line:1 Pos:1)
 ` {
 		t.Error("Unexpected result:", testTerm.out.String())
 		return

+ 1 - 1
cli/tool/pack_test.go

@@ -270,7 +270,7 @@ func testRunningPackedBinary(t *testing.T) {
 		return
 	}
 
-	if !strings.HasPrefix(out.String(), "ECAL error in packtest/dest.exe.error: 123 () (Line:1 Pos:12)") ||
+	if !strings.HasPrefix(out.String(), "ECAL error in packtest/dest.exe.error") ||
 		!strings.Contains(out.String(), "raise(123)") {
 		t.Error("Unexpected result:", out.String())
 		return

+ 4 - 4
interpreter/debug_test.go

@@ -366,7 +366,7 @@ log("test3")
           ],
           "Runtime": {}
         },
-        "Source": "ECALTestRuntime",
+        "Source": "ECALTestRuntime (ECALEvalTest)",
         "Trace": null,
         "Type": "foo"
       },
@@ -387,8 +387,8 @@ log("test3")
 
 	if evalError == nil || testlogger.String() != `
 test1
-test2`[1:] || evalError.Error() != "ECAL error in ECALTestRuntime: foo () (Line:3 Pos:2)" {
-		t.Error("Unexpected result:", testlogger.String(), err)
+test2`[1:] || evalError.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): foo () (Line:3 Pos:2)" {
+		t.Error("Unexpected result:", testlogger.String(), evalError, err)
 		return
 	}
 }
@@ -1401,7 +1401,7 @@ a()
 	ss := err.(util.TraceableRuntimeError)
 
 	if out := fmt.Sprintf("%v\n  %v", err.Error(), strings.Join(ss.GetTraceString(), "\n  ")); out != `
-ECAL error in ECALTestRuntime: testerror () (Line:9 Pos:2)
+ECAL error in ECALTestRuntime (ECALEvalTest): testerror () (Line:9 Pos:2)
   raise("testerror") (ECALEvalTest:9)
   c() (ECALEvalTest:6)
   b() (ECALEvalTest:3)

+ 4 - 4
interpreter/func_provider_test.go

@@ -74,7 +74,7 @@ identifier: a
 `[1:])
 
 	if err == nil ||
-		err.Error() != "ECAL error in ECALTestRuntime: Unknown construct (Unknown function: fmtSprint) (Line:1 Pos:3)" {
+		err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Unknown construct (Unknown function: fmtSprint) (Line:1 Pos:3)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -363,7 +363,7 @@ identifier: a
 `[1:])
 
 	if err == nil ||
-		err.Error() != "ECAL error in ECALTestRuntime: Unknown construct (Unknown function: len) (Line:1 Pos:3)" {
+		err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Unknown construct (Unknown function: len) (Line:1 Pos:3)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -382,7 +382,7 @@ func TestCronTrigger(t *testing.T) {
 		`setCronTrigger("1 * * * *", "foo", "bar")`, nil)
 
 	if err == nil ||
-		err.Error() != "ECAL error in ECALTestRuntime: Runtime error (Cron spec must have 6 entries separated by space) (Line:1 Pos:1)" {
+		err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Runtime error (Cron spec must have 6 entries separated by space) (Line:1 Pos:1)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -446,7 +446,7 @@ func TestPulseTrigger(t *testing.T) {
 		`setPulseTrigger("test", "foo", "bar")`, nil)
 
 	if err == nil ||
-		err.Error() != "ECAL error in ECALTestRuntime: Runtime error (Parameter 1 should be a number) (Line:1 Pos:1)" {
+		err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Runtime error (Parameter 1 should be a number) (Line:1 Pos:1)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}

+ 6 - 1
interpreter/provider.go

@@ -11,6 +11,7 @@
 package interpreter
 
 import (
+	"fmt"
 	"os"
 	"path/filepath"
 	"sync"
@@ -200,7 +201,11 @@ func (erp *ECALRuntimeProvider) Runtime(node *parser.ASTNode) parser.Runtime {
 NewRuntimeError creates a new RuntimeError object.
 */
 func (erp *ECALRuntimeProvider) NewRuntimeError(t error, d string, node *parser.ASTNode) error {
-	return util.NewRuntimeError(erp.Name, t, d, node)
+	source := erp.Name
+	if node.Token != nil {
+		source = fmt.Sprintf("%v (%v)", source, node.Token.Lsource)
+	}
+	return util.NewRuntimeError(source, t, d, node)
 }
 
 /*

+ 8 - 8
interpreter/rt_assign_test.go

@@ -104,7 +104,7 @@ func TestSimpleAssignments(t *testing.T) {
 	_, err = UnitTestEval(
 		`1 := [1, 2]`, vs)
 
-	if err.Error() != "ECAL error in ECALTestRuntime: Cannot access variable (Must have a variable or list of variables on the left side of the assignment) (Line:1 Pos:3)" {
+	if err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Cannot access variable (Must have a variable or list of variables on the left side of the assignment) (Line:1 Pos:3)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -112,7 +112,7 @@ func TestSimpleAssignments(t *testing.T) {
 	_, err = UnitTestEval(
 		`[1] := [1, 2]`, vs)
 
-	if err.Error() != "ECAL error in ECALTestRuntime: Cannot access variable (Must have a list of variables on the left side of the assignment) (Line:1 Pos:5)" {
+	if err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Cannot access variable (Must have a list of variables on the left side of the assignment) (Line:1 Pos:5)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -120,7 +120,7 @@ func TestSimpleAssignments(t *testing.T) {
 	_, err = UnitTestEval(
 		`[a, b] := [1, 2, 3]`, vs)
 
-	if err.Error() != "ECAL error in ECALTestRuntime: Invalid state (Assigned number of variables is different to number of values (2 variables vs 3 values)) (Line:1 Pos:8)" {
+	if err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid state (Assigned number of variables is different to number of values (2 variables vs 3 values)) (Line:1 Pos:8)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -128,7 +128,7 @@ func TestSimpleAssignments(t *testing.T) {
 	_, err = UnitTestEval(
 		`[a, b] := 1`, vs)
 
-	if err.Error() != "ECAL error in ECALTestRuntime: Invalid state (Result is not a list (value is 1)) (Line:1 Pos:8)" {
+	if err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid state (Result is not a list (value is 1)) (Line:1 Pos:8)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -136,7 +136,7 @@ func TestSimpleAssignments(t *testing.T) {
 	_, err = UnitTestEval(
 		`[a, b.c, c] := [1, 2, 3]`, vs)
 
-	if err.Error() != "ECAL error in ECALTestRuntime: Cannot access variable (Variable b is not a container) (Line:1 Pos:13)" {
+	if err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Cannot access variable (Variable b is not a container) (Line:1 Pos:13)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -296,21 +296,21 @@ foo()`, vs)
 
 	res, err = UnitTestEval(`let [1]`, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Let can only declare variables within a list) (Line:1 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Let can only declare variables within a list) (Line:1 Pos:1)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
 
 	res, err = UnitTestEval(`let 1`, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Let must declare a variable or list of variables) (Line:1 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Let must declare a variable or list of variables) (Line:1 Pos:1)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
 
 	res, err = UnitTestEval(`let a.b`, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Let can only declare simple variables) (Line:1 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Let can only declare simple variables) (Line:1 Pos:1)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}

+ 1 - 1
interpreter/rt_func_test.go

@@ -342,7 +342,7 @@ Bar := {
 result1 := new(Bar)
 `, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Runtime error (Property _super must be a list of super classes) (Line:8 Pos:12)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Runtime error (Property _super must be a list of super classes) (Line:8 Pos:12)" {
 		t.Error("Unexpected result:", err)
 		return
 	}

+ 10 - 10
interpreter/rt_general_test.go

@@ -32,12 +32,12 @@ func TestGeneralCases(t *testing.T) {
 	n, _ := parser.Parse("a", "a")
 	inv := &invalidRuntime{newBaseRuntime(rt, n)}
 
-	if err := inv.Validate().Error(); err != "ECAL error in a: Invalid construct (Unknown node: identifier) (Line:1 Pos:1)" {
+	if err := inv.Validate().Error(); err != "ECAL error in a (a): Invalid construct (Unknown node: identifier) (Line:1 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
 
-	if _, err := inv.Eval(nil, nil, 0); err.Error() != "ECAL error in a: Invalid construct (Unknown node: identifier) (Line:1 Pos:1)" {
+	if _, err := inv.Eval(nil, nil, 0); err.Error() != "ECAL error in a (a): Invalid construct (Unknown node: identifier) (Line:1 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -51,7 +51,7 @@ func TestGeneralCases(t *testing.T) {
 	n2.Runtime = inv2
 	n.Children = append(n.Children, n2)
 
-	if err := inv.Validate().Error(); err != "ECAL error in a: Invalid construct (Unknown node: identifier) (Line:1 Pos:1)" {
+	if err := inv.Validate().Error(); err != "ECAL error in a (a): Invalid construct (Unknown node: identifier) (Line:1 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -106,7 +106,7 @@ statements
 	imp.erp.ImportLocator = nil
 	imp.Validate()
 
-	if res, err := imp.Eval(nil, nil, 0); err == nil || err.Error() != "ECAL error in ECALTestRuntime: Runtime error (No import locator was specified) (Line:1 Pos:1)" {
+	if res, err := imp.Eval(nil, nil, 0); err == nil || err.Error() != "ECAL error in ECALTestRuntime (a): Runtime error (No import locator was specified) (Line:1 Pos:1)" {
 		t.Error("Unexpected result:", res, err)
 		return
 	}
@@ -168,7 +168,7 @@ func TestOperatorRuntimeErrors(t *testing.T) {
 	res, err := UnitTestEval(
 		`+ "a"`, nil)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Operand is not a number (a) (Line:1 Pos:3)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a number (a) (Line:1 Pos:3)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -176,7 +176,7 @@ func TestOperatorRuntimeErrors(t *testing.T) {
 	res, err = UnitTestEval(
 		`x := "a"; + x`, nil)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Operand is not a number (x=a) (Line:1 Pos:13)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a number (x=a) (Line:1 Pos:13)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -184,7 +184,7 @@ func TestOperatorRuntimeErrors(t *testing.T) {
 	res, err = UnitTestEval(
 		`not "a"`, nil)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Operand is not a boolean (a) (Line:1 Pos:5)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a boolean (a) (Line:1 Pos:5)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -192,7 +192,7 @@ func TestOperatorRuntimeErrors(t *testing.T) {
 	res, err = UnitTestEval(
 		`a:= 5; a or 6`, nil)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Operand is not a boolean (a=5) (Line:1 Pos:8)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a boolean (a=5) (Line:1 Pos:8)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -200,7 +200,7 @@ func TestOperatorRuntimeErrors(t *testing.T) {
 	res, err = UnitTestEval(
 		`true or 2`, nil)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Operand is not a boolean (2) (Line:1 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a boolean (2) (Line:1 Pos:1)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}
@@ -208,7 +208,7 @@ func TestOperatorRuntimeErrors(t *testing.T) {
 	res, err = UnitTestEval(
 		`a := "foo"; x in a`, nil)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Operand is not a list (a=foo) (Line:1 Pos:13)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a list (a=foo) (Line:1 Pos:13)" {
 		t.Error("Unexpected result: ", res, err)
 		return
 	}

+ 8 - 8
interpreter/rt_sink_test.go

@@ -147,7 +147,7 @@ ErrorResult:[
       "rule3": {
         "data": 123,
         "detail": "Return value: 123",
-        "error": "ECAL error in ECALTestRuntime: *** return *** (Return value: 123) (Line:26 Pos:9)",
+        "error": "ECAL error in ECALTestRuntime (ECALEvalTest): *** return *** (Return value: 123) (Line:26 Pos:9)",
         "type": "*** return ***"
       }
     },
@@ -169,7 +169,7 @@ ErrorResult:[
           123
         ],
         "detail": "User bar was seen",
-        "error": "ECAL error in ECALTestRuntime: UserBarWasHere (User bar was seen) (Line:18 Pos:13)",
+        "error": "ECAL error in ECALTestRuntime (ECALEvalTest): UserBarWasHere (User bar was seen) (Line:18 Pos:13)",
         "type": "UserBarWasHere"
       }
     },
@@ -215,7 +215,7 @@ error: {
   "rule1": {
     "data": null,
     "detail": "Unknown function: noexitingfunctioncall",
-    "error": "ECAL error in ECALTestRuntime: Unknown construct (Unknown function: noexitingfunctioncall) (Line:6 Pos:9)",
+    "error": "ECAL error in ECALTestRuntime (ECALEvalTest): Unknown construct (Unknown function: noexitingfunctioncall) (Line:6 Pos:9)",
     "type": "Unknown construct"
   }
 }`[1:] {
@@ -332,7 +332,7 @@ sink test
 	}
 `, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Unknown expression in sink declaration apa) (Line:3 Pos:5)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Unknown expression in sink declaration apa) (Line:3 Pos:5)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -347,7 +347,7 @@ sink test
 	}
 `, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Expected a list as value) (Line:3 Pos:5)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Expected a list as value) (Line:3 Pos:5)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -361,7 +361,7 @@ sink test
 	}
 `, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid state (Cannot add rule without a kind match: test) (Line:2 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid state (Cannot add rule without a kind match: test) (Line:2 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -375,7 +375,7 @@ sink test
 	}
 `, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Expected a number as value) (Line:3 Pos:5)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Expected a number as value) (Line:3 Pos:5)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -389,7 +389,7 @@ sink test
 	}
 `, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Expected a map as value) (Line:3 Pos:5)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Expected a map as value) (Line:3 Pos:5)" {
 		t.Error("Unexpected result:", err)
 		return
 	}

+ 14 - 14
interpreter/rt_statements_test.go

@@ -819,7 +819,7 @@ for [1, b] in x {
 }
 	   `, vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Must have a list of simple variables on the left side of the In expression) (Line:3 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Must have a list of simple variables on the left side of the In expression) (Line:3 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -877,7 +877,7 @@ for a[t] in 1 {
 }
 	   `[1:], vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Invalid construct (Must have a simple variable on the left side of the In expression) (Line:1 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Invalid construct (Must have a simple variable on the left side of the In expression) (Line:1 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -887,7 +887,7 @@ for [a, b] in [[1,2],[3,4],3] {
 }
 	   `[1:], vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Runtime error (Result for loop variable is not a list (value is 3)) (Line:1 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Runtime error (Result for loop variable is not a list (value is 3)) (Line:1 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -897,7 +897,7 @@ for [a, b] in [[1,2],[3,4],[5,6,7]] {
 }
 	   `[1:], vs)
 
-	if err == nil || err.Error() != "ECAL error in ECALTestRuntime: Runtime error (Assigned number of variables is different to number of values (2 variables vs 3 values)) (Line:1 Pos:1)" {
+	if err == nil || err.Error() != "ECAL error in ECALTestRuntime (ECALEvalTest): Runtime error (Assigned number of variables is different to number of values (2 variables vs 3 values)) (Line:1 Pos:1)" {
 		t.Error("Unexpected result:", err)
 		return
 	}
@@ -962,10 +962,10 @@ error: Something happened: {
     3
   ],
   "detail": "",
-  "error": "ECAL error in ECALTestRuntime: test 12 () (Line:4 Pos:5)",
+  "error": "ECAL error in ECALTestRuntime (ECALEvalTest): test 12 () (Line:4 Pos:5)",
   "line": 4,
   "pos": 5,
-  "source": "ECALTestRuntime",
+  "source": "ECALTestRuntime (ECALEvalTest)",
   "trace": [
     "raise(\"test 12\", null, [1, 2, 3]) (ECALEvalTest:4)"
   ],
@@ -1011,10 +1011,10 @@ error: Something else happened: {
     3
   ],
   "detail": "",
-  "error": "ECAL error in ECALTestRuntime: test 13 () (Line:4 Pos:5)",
+  "error": "ECAL error in ECALTestRuntime (ECALEvalTest): test 13 () (Line:4 Pos:5)",
   "line": 4,
   "pos": 5,
-  "source": "ECALTestRuntime",
+  "source": "ECALTestRuntime (ECALEvalTest)",
   "trace": [
     "raise(\"test 13\", null, [1, 2, 3]) (ECALEvalTest:4)"
   ],
@@ -1022,10 +1022,10 @@ error: Something else happened: {
 }
 Runtime error: {
   "detail": "a=NULL",
-  "error": "ECAL error in ECALTestRuntime: Operand is not a number (a=NULL) (Line:11 Pos:12)",
+  "error": "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a number (a=NULL) (Line:11 Pos:12)",
   "line": 11,
   "pos": 12,
-  "source": "ECALTestRuntime",
+  "source": "ECALTestRuntime (ECALEvalTest)",
   "trace": [],
   "type": "Operand is not a number"
 }
@@ -1076,18 +1076,18 @@ try {
 error: {
   "data": {
     "detail": "a",
-    "error": "ECAL error in ECALTestRuntime: Operand is not a number (a) (Line:4 Pos:12)",
+    "error": "ECAL error in ECALTestRuntime (ECALEvalTest): Operand is not a number (a) (Line:4 Pos:12)",
     "line": 4,
     "pos": 12,
-    "source": "ECALTestRuntime",
+    "source": "ECALTestRuntime (ECALEvalTest)",
     "trace": [],
     "type": "Operand is not a number"
   },
   "detail": "This did not work",
-  "error": "ECAL error in ECALTestRuntime: usererror (This did not work) (Line:6 Pos:3)",
+  "error": "ECAL error in ECALTestRuntime (ECALEvalTest): usererror (This did not work) (Line:6 Pos:3)",
   "line": 6,
   "pos": 3,
-  "source": "ECALTestRuntime",
+  "source": "ECALTestRuntime (ECALEvalTest)",
   "trace": [
     "raise(\"usererror\", \"This did not work\", e) (ECALEvalTest:6)"
   ],