diff options
Diffstat (limited to 'lib/X')
-rw-r--r-- | lib/X/Config/AbstractParser.rakumod | 36 | ||||
-rw-r--r-- | lib/X/Config/FileNoExtension.rakumod | 38 | ||||
-rw-r--r-- | lib/X/Config/FileNotFound.rakumod | 38 | ||||
-rw-r--r-- | lib/X/Config/MissingParser.rakumod | 38 | ||||
-rw-r--r-- | lib/X/Config/NotSupported.rakumod | 39 |
5 files changed, 189 insertions, 0 deletions
diff --git a/lib/X/Config/AbstractParser.rakumod b/lib/X/Config/AbstractParser.rakumod new file mode 100644 index 0000000..712f5af --- /dev/null +++ b/lib/X/Config/AbstractParser.rakumod @@ -0,0 +1,36 @@ +#! /usr/bin/env false + +use v6.d; + +unit class X::Config::AbstractParser is Exception; + +method message +{ + 'You must use an implementation class of Config::Parser, not the base role' +} + +=begin pod + +=NAME X::Config::AbstractParser +=VERSION 3.0.0 +=AUTHOR Patrick Spek <p.spek@tyil.work> + +=begin LICENSE +Copyright © 2020 + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation, version 3. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see http://www.gnu.org/licenses/. +=end LICENSE + +=end pod + +# vim: ft=raku noet sw=8 ts=8 diff --git a/lib/X/Config/FileNoExtension.rakumod b/lib/X/Config/FileNoExtension.rakumod new file mode 100644 index 0000000..7bf30f4 --- /dev/null +++ b/lib/X/Config/FileNoExtension.rakumod @@ -0,0 +1,38 @@ +#! /usr/bin/env false + +use v6.d; + +unit class X::Config::FileNoExtension is Exception; + +has IO::Path $.path; + +method message +{ + "The file at $!path does not have an extension, so no Config::Parser implementation can be deduced for it. Try setting an explicit parser." +} + +=begin pod + +=NAME X::Config::FileNoExtension +=VERSION 3.0.0 +=AUTHOR Patrick Spek <p.spek@tyil.work> + +=begin LICENSE +Copyright © 2020 + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation, version 3. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see http://www.gnu.org/licenses/. +=end LICENSE + +=end pod + +# vim: ft=raku noet sw=8 ts=8 diff --git a/lib/X/Config/FileNotFound.rakumod b/lib/X/Config/FileNotFound.rakumod new file mode 100644 index 0000000..68ae347 --- /dev/null +++ b/lib/X/Config/FileNotFound.rakumod @@ -0,0 +1,38 @@ +#! /usr/bin/env false + +use v6.d; + +unit class X::Config::FileNotFound is Exception; + +has IO::Path $.path; + +method message +{ + "Could not find file at $!path.absolute()" +} + +=begin pod + +=NAME X::Config::FileNotFound +=VERSION 3.0.0 +=AUTHOR Patrick Spek <p.spek@tyil.work> + +=begin LICENSE +Copyright © 2020 + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation, version 3. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see http://www.gnu.org/licenses/. +=end LICENSE + +=end pod + +# vim: ft=raku noet sw=8 ts=8 diff --git a/lib/X/Config/MissingParser.rakumod b/lib/X/Config/MissingParser.rakumod new file mode 100644 index 0000000..9d11cd5 --- /dev/null +++ b/lib/X/Config/MissingParser.rakumod @@ -0,0 +1,38 @@ +#! /usr/bin/env false + +use v6.d; + +unit class X::Config::MissingParser is Exception; + +has Str $.parser; + +method message +{ + "$!parser is not a valid parser. Are you sure its installed?" +} + +=begin pod + +=NAME X::Config::MissingParser +=VERSION 3.0.0 +=AUTHOR Patrick Spek <p.spek@tyil.work> + +=begin LICENSE +Copyright © 2020 + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation, version 3. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see http://www.gnu.org/licenses/. +=end LICENSE + +=end pod + +# vim: ft=raku noet sw=8 ts=8 diff --git a/lib/X/Config/NotSupported.rakumod b/lib/X/Config/NotSupported.rakumod new file mode 100644 index 0000000..f5c2d84 --- /dev/null +++ b/lib/X/Config/NotSupported.rakumod @@ -0,0 +1,39 @@ +#! /usr/bin/env false + +use v6.d; + +unit class X::Config::NotSupported is Exception; + +has Str $.call; +has Str $.help; + +method message +{ + $!help +} + +=begin pod + +=NAME X::Config::NotSupported +=VERSION 3.0.0 +=AUTHOR Patrick Spek <p.spek@tyil.work> + +=begin LICENSE +Copyright © 2020 + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU Lesser General Public License as published by the Free +Software Foundation, version 3. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU Lesser General Public License for more +details. + +You should have received a copy of the GNU Lesser General Public License along +with this program. If not, see http://www.gnu.org/licenses/. +=end LICENSE + +=end pod + +# vim: ft=raku noet sw=8 ts=8 |