diff options
Diffstat (limited to 'lib/Matrix/Client/Exception.rakumod')
-rw-r--r-- | lib/Matrix/Client/Exception.rakumod | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Matrix/Client/Exception.rakumod b/lib/Matrix/Client/Exception.rakumod new file mode 100644 index 0000000..6fb4c75 --- /dev/null +++ b/lib/Matrix/Client/Exception.rakumod @@ -0,0 +1,17 @@ +module Matrix::Client::Exception { + + class X::Matrix::Response is Exception { + has $.code; + has $.error; + + method message(--> Str) { + "$!code: $!error" + } + } + + class X::Matrix::MXCParse is Exception { + has $.uri; + + method message { "Cannot parse '$!uri'" } + } +} |