[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-apl] 19⎕CR prints stack trace for bad UTF-8
From: |
Kacper Gutowski |
Subject: |
[Bug-apl] 19⎕CR prints stack trace for bad UTF-8 |
Date: |
Sat, 19 Mar 2016 21:14:14 +0100 |
Giving malformed string to 19⎕CR results in it printing an error
message and a stack trace, and then returning an empty vector. As
it's generally very useful to have generic routine parsing UTF-8
data at hand, I think it shouldn't do that. If it's an error, it
should be possible to handle it with ⎕EC or ⎕EA. I would expect
it to return a domain error; after all, malformed vector is simply
outside the domain of valid UTF-8 vectors. Although I'm not
against it returning empty vector as it's easier to handle, it
just shouldn't print that stack trace.
8⎕CR⎕EC'19⎕CR ⎕UCS 128'
Bad UTF8 string: 0x80 at UCS_string.cc:65
----------------------------------------
-- Stack trace at UCS_string.cc:66
----------------------------------------
0x7f4810a37610 __libc_start_main
0x443db5 main
0x579b9d Workspace::immediate_execution(bool)
0x48b22a Command::process_line()
0x48b2ea Command::do_APL_expression(UCS_string&)
0x496135 Executable::execute_body() const
0x525370 StateIndicator::run()
0x4cb918 Prefix::reduce_statements()
0x4c6ae5 Prefix::reduce_A_F_B_()
0x4fe154 Quad_CR::eval_AB(Value_P, Value_P)
0x4fc3b5 Quad_CR::do_CR(long, Value const&, PrintContext)
0x556e26 UCS_string::UCS_string(UTF8_string const&)
========================================
┌→──────────┐
│1 ┌→──┐ ┌⊖┐│
│ │0 0│ │ ││
│ └───┘ └─┘│
└∊──────────┘
-k
- [Bug-apl] 19⎕CR prints stack trace for bad UTF-8,
Kacper Gutowski <=