diff options
author | Matias Linares <matiaslina@gmail.com> | 2021-01-11 22:48:16 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2021-01-11 22:48:16 -0300 |
commit | f6397392c4fc88d1e9335bbbc4f91d8cb2f29368 (patch) | |
tree | dddb106193d48ca078946d2edb403ef75faca9dd /lib/Matrix/Client/Exception.rakumod | |
parent | 14551a46b61a78a55cacf282e0534a1938215467 (diff) | |
parent | 289165e26df8830a15b6df1a63321583a2e67499 (diff) | |
download | perl6-matrix-client-f6397392c4fc88d1e9335bbbc4f91d8cb2f29368.tar.gz |
Merge branch 'documentation'
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'" } + } +} |