aboutsummaryrefslogtreecommitdiff
path: root/lib/Config/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Config/Exception')
-rw-r--r--lib/Config/Exception/FileNotFoundException.pm64
-rw-r--r--lib/Config/Exception/MissingParserException.pm613
-rw-r--r--lib/Config/Exception/UnimplementedMethodException.pm64
-rw-r--r--lib/Config/Exception/UnknownTypeException.pm64
-rw-r--r--lib/Config/Exception/UnsupportedTypeException.pm611
5 files changed, 22 insertions, 14 deletions
diff --git a/lib/Config/Exception/FileNotFoundException.pm6 b/lib/Config/Exception/FileNotFoundException.pm6
index 74d7bc1..b00f956 100644
--- a/lib/Config/Exception/FileNotFoundException.pm6
+++ b/lib/Config/Exception/FileNotFoundException.pm6
@@ -4,8 +4,10 @@ use v6.c;
class Config::Exception::FileNotFoundException is Exception
{
+ has Str $.path;
+
method message()
{
- "Could not find file"
+ "Could not find file at $!path"
}
}
diff --git a/lib/Config/Exception/MissingParserException.pm6 b/lib/Config/Exception/MissingParserException.pm6
new file mode 100644
index 0000000..484026a
--- /dev/null
+++ b/lib/Config/Exception/MissingParserException.pm6
@@ -0,0 +1,13 @@
+#! /usr/bin/env false
+
+use v6.c;
+
+class Config::Exception::MissingParserException is Exception
+{
+ has Str $.parser;
+
+ method message()
+ {
+ "$!parser is not a valid parser. Are you sure its installed?"
+ }
+}
diff --git a/lib/Config/Exception/UnimplementedMethodException.pm6 b/lib/Config/Exception/UnimplementedMethodException.pm6
index ae87db9..10af289 100644
--- a/lib/Config/Exception/UnimplementedMethodException.pm6
+++ b/lib/Config/Exception/UnimplementedMethodException.pm6
@@ -4,8 +4,10 @@ use v6.c;
class Config::Exception::UnimplementedMethodException is Exception
{
+ has Str $.method;
+
method message()
{
- "This method is not implemented"
+ "The $!method method is not implemented"
}
}
diff --git a/lib/Config/Exception/UnknownTypeException.pm6 b/lib/Config/Exception/UnknownTypeException.pm6
index de58755..095572b 100644
--- a/lib/Config/Exception/UnknownTypeException.pm6
+++ b/lib/Config/Exception/UnknownTypeException.pm6
@@ -4,8 +4,10 @@ use v6.c;
class Config::Exception::UnknownTypeException is Exception
{
+ has Str $.file;
+
method message()
{
- "Could not deduce loader type."
+ "Could not deduce loader type for $!file."
}
}
diff --git a/lib/Config/Exception/UnsupportedTypeException.pm6 b/lib/Config/Exception/UnsupportedTypeException.pm6
deleted file mode 100644
index c2f6f10..0000000
--- a/lib/Config/Exception/UnsupportedTypeException.pm6
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /usr/bin/env false
-
-use v6.c;
-
-class Config::Exception::UnsupportedTypeException is Exception
-{
- method message()
- {
- "No parser support for the given file. Have you imported a correct parser?"
- }
-}