Skip Menu |
Report information
Id: 130489
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)



From: brian d foy <brian.d.foy [...] gmail.com>
Date: Mon, 2 Jan 2017 19:53:16 -0500
To: rakudobug [...] perl.org
Subject: spurt throws exception instead of returning failure on encoding issue
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