diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-11-25 22:30:36 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-11-25 22:30:36 -0800 |
commit | eb2b6cd21e06b3a421ede3f7a6ae78b932dcab19 (patch) | |
tree | 88145f60924cc2d2ab69e7ca517c6ff7d24cdd12 | |
parent | cfa5a9f88756443f6d857726ace97ebbb3967d76 (diff) | |
download | mu-eb2b6cd21e06b3a421ede3f7a6ae78b932dcab19.tar.gz |
3693
-rw-r--r-- | 088file.mu | 6 | ||||
-rw-r--r-- | html/088file.mu.html | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/088file.mu b/088file.mu index fb03e8bf..e91723ab 100644 --- a/088file.mu +++ b/088file.mu @@ -90,7 +90,11 @@ def start-writing resources:&:resources, filename:text -> sink:&:sink:char, rout } # real file system file:num <- $open-file-for-writing filename - assert file, [no such file] + { + break-if file + msg:text <- append [no such file: ] filename + assert file, msg + } routine-id <- start-running transmit-to-file file, source ] diff --git a/html/088file.mu.html b/html/088file.mu.html index db45a81e..8f044eaa 100644 --- a/html/088file.mu.html +++ b/html/088file.mu.html @@ -123,7 +123,11 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">}</span> <span class="Comment"># real file system</span> file:num <span class="Special"><-</span> $open-file-for-writing filename - assert file, <span class="Constant">[no such file]</span> + <span class="Delimiter">{</span> + <span class="muControl">break-if</span> file + msg:text <span class="Special"><-</span> append <span class="Constant">[no such file: ]</span> filename + assert file, msg + <span class="Delimiter">}</span> routine-id <span class="Special"><-</span> start-running transmit-to-file file, source ] |