BIND 10 #2369: InputSource helper class for MasterLexer
BIND 10 Development
do-not-reply at isc.org
Sun Nov 4 17:30:42 UTC 2012
#2369: InputSource helper class for MasterLexer
-------------------------------------+-------------------------------------
Reporter: | Owner: muks
jinmei | Status: reviewing
Type: task | Milestone:
Priority: | Sprint-20121106
medium | Resolution:
Component: | Sensitive: 0
libdns++ | Sub-Project: DNS
Keywords: | Estimated Difficulty: 4
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
loadzone-ng |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by muks):
Hi Jinmei
Replying to [comment:16 jinmei]:
> In my attempt of integrating this branch into #2371, I noticed a few
> more things:
>
> - I suggest including what's wrong when throwing OpenError:
> {{{#!cpp
> isc_throw(OpenError,
> "Error opening the input source file: " << filename);
> }}}
> "no such file", "permission denied", etc.
> - if not super hard, I'd test a different failure case for `OpenError`
> like it's not readable (due to permission or possible some other
> reason)
I'd like to do these two, and return the appropriate error, but I could
not find a way of getting such messages from fstream. It's possible to
make fstream throw an exception by setting the exception bits, but the
description (`ex.what()`) contains a weird message "basic_ios::clear". We
can alternatively check `stat()` output, but it's better to get a proper
error from fstream if it's possible.
> - In `InputSource::getChar` variables `c` should become const. Also
> check other possible cases where you can make them const.
Done. :)
--
Ticket URL: <http://bind10.isc.org/ticket/2369#comment:19>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list