On 03/12/2019 04:46, Paul Procacci wrote: > On success it return a Bool::True. > On failure it throws an exception. > It doesn't crash the program. > If you are interested in handling the exception, add logic to handle it. > > Examples: > --------------------------- > # mkdir a ; `which perl6` -e "'a'.IO.rmdir.perl.say" > Bool::True > # mkdir a ; `which perl6` -e "'b'.IO.rmdir.perl.say" > Failure.new(exception => X::IO::Rmdir.new(path => "/root/test/b", > os-error => "Failed to rmdir: no such file or directory"), backtrace > => Backtrace.new) > # mkdir a ; `which perl6` -e "try { 'b'.IO.rmdir.perl.say; CATCH { > default { 'tsk tsk'.say }}}" > tsk tsk
Hi Paul, thanks to your email I found and fixed an oversight in the Raku docs: it says it throws an exception, when actually it returns a Failure. Thank you! - Timo