hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit d41067dd9d496366c054d76eca7f8401fc98b0e8
parent 241031a34c6b8d6b343c2abf40ba90790fab6eec
Author: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Date:   Wed, 14 Apr 2021 13:01:42 +0200

bufio/memstream.ha: make abort messages more descriptive

Diffstat:
Mbufio/memstream.ha | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bufio/memstream.ha b/bufio/memstream.ha @@ -109,7 +109,7 @@ fn dynamic_close(s: *io::stream) void = { // ownership of it to the caller. export fn finish(s: *io::stream) []u8 = { if (s.closer != &dynamic_close) { - abort("bufio::finish called on non-bufio stream"); + abort("bufio::finish called on non-bufio::dynamic stream"); }; let s = s: *memstream; let buf = s.buf; @@ -120,7 +120,7 @@ export fn finish(s: *io::stream) []u8 = { // Returns the current buffer. export fn buffer(s: *io::stream) []u8 = { if (s.closer != &dynamic_close) { - abort("bufio::buffer called on non-bufio stream"); + abort("bufio::buffer called on non-bufio::dynamic stream"); }; let s = s: *memstream; return s.buf; @@ -130,7 +130,7 @@ export fn buffer(s: *io::stream) []u8 = { // around for future writes. export fn reset(s: *io::stream) void = { if (s.writer != &dynamic_write) { - abort("bufio::reset called on non-bufio stream"); + abort("bufio::reset called on non-bufio::dynamic stream"); }; const s = s: *memstream; s.pos = 0;