Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more exception classes
  • Loading branch information
moritz committed Aug 17, 2012
1 parent 2ecf87d commit b538abe
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/X/Comp.pod
Expand Up @@ -6,4 +6,25 @@
Common role for compile-time errors.
Note that since the backtrace of a compile time error generally shows
routines from the compiler, not from user-space programs, the L<Backtrace>
returned from the L<backtrace> method is not very informative. Instead
the exception carries its own C<filename>, C<line> and C<column> attributes
and public accessors.
=head1 Methods
=head2 filename
The filename in which the compilation error occurred
=head2 line
The line number in which the compilation error occurred.
=head2 column
The column number of location where the compilation error occurred.
(Rakudo does not implement that yet).
=end pod
13 changes: 13 additions & 0 deletions lib/X/IO/Chmod.pod
@@ -0,0 +1,13 @@
=begin pod
=TITLE class X::IO::Chmod
class X::IO::Chmod does X::IO is Exception
Error class for failed C<chmod> calls.
A typical error message is
Failed to set the mode of '/home/other' to '0o777': Permission denied
=end pod
19 changes: 19 additions & 0 deletions lib/X/IO/Rmdir.pod
@@ -0,0 +1,19 @@
=begin pod
=TITLE class X::IO::Rmdir
my class X::IO::Rmdir does X::IO is Exception
Error class for failed L<&rmdir> operations.
A typical error message is
Failed to remove the directory 'lib': Directory not empty
=head1 Methods
=head2 path
Returns the path L<&rmdir> failed to remove
=end pod
19 changes: 19 additions & 0 deletions lib/X/IO/Unlink.pod
@@ -0,0 +1,19 @@
=begin pod
=TITLE class X::IO::Unlink
class X::IO::Unlink does X::IO is Exception
Error class for failed L<&unlink> operation.
A typica error message is
Failed to remove the file 'secret': Permission defined
=head1 Methods
=head2 path
Returns the path that L<&unlink> failed to delete.
=end pod
27 changes: 27 additions & 0 deletions lib/X/NYI.pod
@@ -0,0 +1,27 @@
=begin pod
=TITLE class X::NYI
class X::NYI is Exception { }
Error class for unimplemented features. I<NYI> stands for I<Not Yet
Implemented>.
If a Perl 6 compiler is not yet feature complete, it may throw an C<X::NYI>
exception when a program uses a feature that it can detect is not yet
implemented.
A full-featured Perl 6 compiler must not throw such exceptions, but
still provide the C<X::NYI> class for compatiblity reasons.
A typical error message is
HyperWhatever is not yet implemented. Sorry.
=head1 Methods
=head2 features
Returns a C<Str> describing the missing feature.
=end pod
21 changes: 21 additions & 0 deletions lib/X/Placeholder/Block.pod
@@ -0,0 +1,21 @@
=begin pod
=TITLE class X::Placeholder
class X::Placeholder::Block does X::Comp
Thrown when a placeholder variable is used in a block that does not allow a
signature (for example C<class A { $^foo }>.
A typical error message is
Placeholder variable $^foo may not be used here because the surrounding block takes no signature
=head1 Methods
=head2 placeholder
Returns the name of the (first) illegally used placeholder.
=end pod

0 comments on commit b538abe

Please sign in to comment.