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

all: bring back panic(err.msg) -> panic(err) (#9022)

This commit is contained in:
spaceface
2021-03-01 00:18:14 +01:00
committed by GitHub
parent ce115dcbe0
commit b712af56fd
110 changed files with 383 additions and 387 deletions

View File

@ -16,7 +16,7 @@ struct User {
}
fn main() {
db := sqlite.connect(':memory:') or { panic(err.msg) }
db := sqlite.connect(':memory:') or { panic(err) }
db.exec('drop table if exists User')
db.exec("create table Module (id integer primary key, name text default '', nr_downloads int default 0, creator int default 0);")
db.exec("create table User (id integer primary key, age int default 0, name text default '', is_customer int default 0);")
@ -33,12 +33,12 @@ fn main() {
sql db {
insert mod into Module
}
modul := sql db {
select from Module where id == 1
}
println(modul.name)
println(modul.creator.name)
}

View File

@ -41,7 +41,7 @@ fn main() {
// by adding `limit 1` we tell V that there will be only one object
println(dash)
existing := db.select from Customer where id == 1 limit 1 or { panic(err.msg) }
existing := db.select from Customer where id == 1 limit 1 or { panic(err) }
println('Existing customer name: $existing.name')
println('Existing customer full information:')
println(existing)