1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v.eval: consistency in commit hash shown on panic (#16227)

This commit is contained in:
StunxFS 2022-10-27 23:47:50 -04:00 committed by GitHub
parent c5ee33b7aa
commit 219079e3a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,8 +231,9 @@ fn (e Eval) error(msg string) {
}
fn (e Eval) panic(s string) {
commithash := unsafe { tos5(&char(C.V_CURRENT_COMMIT_HASH)) }
eprintln('V panic: $s')
eprintln('V hash: ${@VHASH}')
eprintln('V hash: $commithash')
e.print_backtrace()
exit(1)
}