trapping system

this is a funny one… the q expression dumps me into k… and it’s a type 101h - unary primitive

KDB+ 3.0 2012.11.13 Copyright (C) 1993-2012 Kx Systems
l32/ 2()core 3539MB jack localhost.localdomain 127.0.0.1 PLAY 2013.02.11

q)type system “l nofile” 42
? \
q)type system “l nofile” 42
101h
? \
q)

i’m trying to get ? @[system;“l 42”;0] ? to work.? i want to catch the error so i can print it - ie.
? '42: No such file or directory

can i get the error?

ta, jack

how about

q)\l nofile

k){if[$[1>@d:!f:-1!x;1;.d~*d];:.[$[qt d;*|:f;.];();:;d:. f]];d@:&~d like"*$";p:(d=par.txt)|d like"[0-9]*";

 ."\cd “,$x;f .q.set’{$[0h>@!x:-1!x;. x;x`]}'f:d@&~(d=`html)|p|s:”.“in’$d;if[|/p;L d@&p];if[~`.=x;(.”\l ",$:)'d@&s&~p];}

'nofile: No such file or directory

.:

`:nofile

q.Q))

q.Q))\

q)@[system; “l nofile”; ::]

“nofile: No such file or directory”

q)error:@[system; “l nofile”; ::]

q)type error

10h

q)error

“nofile: No such file or directory”

q)

q)@[system;“l 42”;{x}]
“42: No such file or directory”

Also good to return success/fail

q)res:@[{(0b;system)};“l 42”;{(1b;x)}]
q)if[res[0];-1 res[1]]
42: No such file or directory