| 12345678910 | -- error in loaded script should be caught here, instead of exiting everythinglocal success, err = pcall(require, arg[1])local exception_message = string.match(tostring(err), '^[^\n]+')local has_expected_message = string.match(exception_message, arg[2]) ~= nillocal has_stack_trace = string.match(tostring(err), 'stack traceback') ~= nilprint('Success: '..tostring(success))print('Has expected exception message: '..tostring(has_expected_message))print('Has call stack: '..tostring(has_stack_trace))
 |