go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/misc/errors_like.star (about) 1 load("@stdlib//internal/error.star", "error") 2 3 def func1(): 4 error("hello %s", "world") 5 6 def capture_stack(): 7 return stacktrace() 8 9 def func2(): 10 return capture_stack() 11 12 s = func2() 13 14 func1() 15 error("another err", trace = s) 16 17 # Expect errors like: 18 # 19 # Traceback (most recent call last): 20 # ... 21 # Error: hello world 22 # 23 # Traceback (most recent call last): 24 # ... 25 # //testdata/misc/errors_like.star: in func2 26 # //testdata/misc/errors_like.star: in capture_stack 27 # <builtin>: in stacktrace 28 # Error: ??? err