Skip Menu |
Report information
Id: 130490
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: comdog <brian.d.foy [at] gmail.com>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: spurt throws on encoding issue, instead of returning Failure
To: rakudobug [...] perl.org
Date: Mon, 2 Jan 2017 19:58:57 -0500
From: brian d foy <brian.d.foy [...] gmail.com>
Download (untitled) / with headers
text/plain 606b
On encoding failure, spurt throws an exception immediately instead of returning a Failure (https://docs.perl6.org/routine/spurt): my $path = $*SPEC.catfile( $*SPEC.tmpdir, $file ); unless my $rc = spurt $path, '─░stanbul', enc => 'iso-8859-1' { my $e = $rc.exception; put "unless: {$e.^name}: {$e.message}"; } CATCH { put "Caught {.^name}: {.message}"; } I get the CATCH block instead of the unless: Caught X::AdHoc: Error encoding Latin-1 string: could not encode codepoint 304 Error encoding Latin-1 string: could not encode codepoint 304


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org