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

replace silly exit(reason string) with exit(code int)

This commit is contained in:
Alexander Medvednikov
2019-06-23 10:12:09 +02:00
parent 0d1d5612ae
commit 06a4dfa290
6 changed files with 26 additions and 108 deletions

View File

@ -456,14 +456,13 @@ fn (s mut Scanner) scan() ScanRes {
}
fn (s &Scanner) error(msg string) {
// println('!! SCANNER ERROR: $msg')
file := s.file_path.all_after('/')
println('panic: $file:${s.line_nr + 1}')
println(msg)
// os.print_backtrace()
// println(file)
// println(s.file_path)
os.exit1(' ')
exit(1)
}
// println('array out of bounds $idx len=$a.len')