=begin pod =TITLE class X::AdHoc class X::AdHoc is Exception { ... } C is the type into which objects are wrapped if they are thrown as exceptions, but don't inherit from L. Its benefit over returning non-C objects is that it gives access to all the methods from class L, like C and C. You can obtain the original object with the C method. try { die [404, 'File not found']; # throw non-exception object } say "Got HTTP code ", $!.payload[0], # 404 " and backtrace ", $!.backtrace; =head1 Methods =head2 payload method payload(X::AdHoc:D) Returns the original object which was passed to C. =end pod