builtin: make panics more IDE friendly
parent
e554415123
commit
1753445a64
|
@ -207,7 +207,7 @@ fn main() {
|
|||
args := os.args.clone()
|
||||
args_string := args[1..].join(' ')
|
||||
cmd_prefix := args_string.all_before('test-self')
|
||||
title := 'testing all tests'
|
||||
title := 'testing vlib'
|
||||
all_test_files := os.walk_ext(os.join_path(vroot, 'vlib'), '_test.v')
|
||||
testing.eheader(title)
|
||||
mut tsession := testing.new_test_session(cmd_prefix)
|
||||
|
|
|
@ -22,8 +22,7 @@ fn panic_debug(line_no int, file string, mod string, fn_name string, s string) {
|
|||
eprintln(' module: $mod')
|
||||
eprintln(' function: ${fn_name}()')
|
||||
eprintln(' message: $s')
|
||||
eprintln(' file: $file')
|
||||
eprintln(' line: ' + line_no.str())
|
||||
eprintln(' file: $file:$line_no')
|
||||
eprintln('=========================================')
|
||||
$if exit_after_panic_message ? {
|
||||
C.exit(1)
|
||||
|
|
|
@ -138,7 +138,7 @@ fn (mut v Builder) rebuild_cached_module(vexe string, imp_path string) string {
|
|||
vcache.dlog('| Builder.' + @FN, 'vexe: $vexe | imp_path: $imp_path | rebuild_cmd: $rebuild_cmd')
|
||||
os.system(rebuild_cmd)
|
||||
rebuilded_o := v.pref.cache_manager.exists('.o', imp_path) or {
|
||||
panic('could not rebuild cache module for $imp_path, error: $err')
|
||||
panic('could not rebuild cache module for $imp_path, error: $err.msg')
|
||||
}
|
||||
os.chdir(pwd)
|
||||
return rebuilded_o
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
module: main
|
||||
function: buggy_function()
|
||||
message: panicing...
|
||||
file: vlib/v/tests/inout/panic_with_cg.vv
|
||||
line: 3
|
||||
file: vlib/v/tests/inout/panic_with_cg.vv:3
|
||||
|
|
Loading…
Reference in New Issue