mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: use cerror instead of panic.
This commit is contained in:
committed by
Alexander Medvednikov
parent
32683ad6fd
commit
83954acfd4
@@ -28,11 +28,12 @@ mut:
|
||||
|
||||
fn new_scanner(file_path string) *Scanner {
|
||||
if !os.file_exists(file_path) {
|
||||
panic('"$file_path" doesn\'t exist')
|
||||
cerror('"$file_path" doesn\'t exist')
|
||||
}
|
||||
|
||||
mut raw_text := os.read_file(file_path) or {
|
||||
panic('scanner: failed to open "$file_path"')
|
||||
cerror('scanner: failed to open "$file_path"')
|
||||
return 0
|
||||
}
|
||||
|
||||
// BOM check
|
||||
|
||||
Reference in New Issue
Block a user