mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
all: bring back panic(err.msg)
-> panic(err)
(#9022)
This commit is contained in:
parent
ce115dcbe0
commit
b712af56fd
110 changed files with 383 additions and 387 deletions
|
@ -44,7 +44,7 @@ fn (mut a App) set_status(msg string, duration_ms int) {
|
|||
fn (mut a App) save() {
|
||||
if a.cfile().len > 0 {
|
||||
b := a.ed
|
||||
os.write_file(a.cfile(), b.raw()) or { panic(err.msg) }
|
||||
os.write_file(a.cfile(), b.raw()) or { panic(err) }
|
||||
a.set_status('Saved', 2000)
|
||||
} else {
|
||||
a.set_status('No file loaded', 4000)
|
||||
|
@ -456,7 +456,7 @@ fn (mut a App) init_file() {
|
|||
// 'vico: ' +
|
||||
a.tui.set_window_title(a.files[a.current_file])
|
||||
mut b := a.ed
|
||||
content := os.read_file(a.files[a.current_file]) or { panic(err.msg) }
|
||||
content := os.read_file(a.files[a.current_file]) or { panic(err) }
|
||||
b.put(content)
|
||||
a.ed.cursor.pos_x = init_x
|
||||
a.ed.cursor.pos_y = init_y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue