diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2018-02-13 20:53:30 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2018-02-13 20:53:30 -0300 |
commit | 3dc7d5cba044e16776291f520fd68ac190bcbfb6 (patch) | |
tree | e11113ddceda95ec0d19a0836e2bd1085d6a2995 /lib/Matrix/Client/Exception.pm6 | |
parent | 48275aea7d425f83650650807704770dcf1634bb (diff) | |
download | perl6-matrix-client-3dc7d5cba044e16776291f520fd68ac190bcbfb6.tar.gz |
Add simple error handling
Diffstat (limited to 'lib/Matrix/Client/Exception.pm6')
-rw-r--r-- | lib/Matrix/Client/Exception.pm6 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Matrix/Client/Exception.pm6 b/lib/Matrix/Client/Exception.pm6 new file mode 100644 index 0000000..924eece --- /dev/null +++ b/lib/Matrix/Client/Exception.pm6 @@ -0,0 +1,10 @@ +package X::Matrix { + class Response is Exception { + has $.code; + has $.error; + + method message { + "$!code: $!error" + } + } +} |