mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: skip print_backtraces on panics with tcc, it does it automatically
This commit is contained in:
parent
9b4c81e85f
commit
498c8cfc8e
@ -43,14 +43,20 @@ fn panic_debug(line_no int, file, mod, fn_name, s string) {
|
|||||||
eprintln(' file: $file')
|
eprintln(' file: $file')
|
||||||
eprintln(' line: ' + line_no.str())
|
eprintln(' line: ' + line_no.str())
|
||||||
eprintln('=========================================')
|
eprintln('=========================================')
|
||||||
print_backtrace_skipping_top_frames(1)
|
// recent versions of tcc print better backtraces automatically
|
||||||
|
$if !tinyc {
|
||||||
|
print_backtrace_skipping_top_frames(1)
|
||||||
|
}
|
||||||
break_if_debugger_attached()
|
break_if_debugger_attached()
|
||||||
C.exit(1)
|
C.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn panic(s string) {
|
pub fn panic(s string) {
|
||||||
eprintln('V panic: $s')
|
eprintln('V panic: $s')
|
||||||
print_backtrace()
|
// recent versions of tcc print better backtraces automatically
|
||||||
|
$if !tinyc {
|
||||||
|
print_backtrace()
|
||||||
|
}
|
||||||
break_if_debugger_attached()
|
break_if_debugger_attached()
|
||||||
C.exit(1)
|
C.exit(1)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user