[PATCH v2 4/3] Somewhat better error for std.put("{w=?}", "foo")
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: [PATCH v2 4/3] Somewhat better error for std.put("{w=?}", "foo")
- From: "S. Gilles" <sgilles@xxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Sun, 1 Dec 2019 10:58:44 -0500
- To: "myrddin-dev" <myrddin-dev@xxxxxxxxxxxxxx>
- Cc: "S. Gilles" <sgilles@xxxxxxx>
---
This should be the last for this series, it's been put through light
local use without any other fires.
lib/std/fmt.myr | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/std/fmt.myr b/lib/std/fmt.myr
index 41785244..4a70c210 100644
--- a/lib/std/fmt.myr
+++ b/lib/std/fmt.myr
@@ -593,6 +593,10 @@ const getint = {s, msg
}
const pullint = {ap, msg
+ if ap.tc.nelt < 1
+ die("expected argument where none was provided")
+ ;;
+
match typedesc(vatype(ap))
| `Tyint8:
var val : int8 = vanext(ap)
--
2.24.0
- Next by Date: Re: [PATCH v2 4/3] Somewhat better error for std.put("{w=?}", "foo")
- Next by thread: Re: [PATCH v2 4/3] Somewhat better error for std.put("{w=?}", "foo")
- Index(es):