// `result.expect` on an `Error` panics with the message and the reason. import std/io import std/result import std/string pub fn main :: -> () / { io.println (show (result.expect (string.to_int "12") "a literal")) io.println (show (result.expect (string.to_int "twelve") "a literal")) } //> 12 //! panic: a literal: "not an integer: \"twelve\""