From e2ebfbb7d19ff3b990eb51dc9843200053cbbf98 Mon Sep 17 00:00:00 2001 From: glenda Date: Sat, 10 Sep 2022 16:25:05 +0000 Subject: Improve the session a lot --- error.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'error.c') diff --git a/error.c b/error.c index 7ec8b68..45670f5 100644 --- a/error.c +++ b/error.c @@ -71,4 +71,17 @@ errorstr(int code) default: err = L""; break; } return err; +} + +void +displayerror(void) +{ + ThreadData *td = getthreaddata(); + Array *error = allocarray(AtypeArray, 1, 3); + error->shape[0] = 3; + error->arraydata[0] = mkrunearray(errorstr(td->lasterror)); + error->arraydata[1] = mkrunearray(td->lasterrormsg ? td->lasterrormsg : L""); + error->arraydata[2] = fnSame(td->name); + rundfn(L"0::⎕RAWIO←⍵ ⋄ ('!' ⍵) ⍈ ⎕SESSION", nil, nil, nil, error); + freearray(error); } \ No newline at end of file -- cgit v1.2.3