summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--drmaa/errors.scm36
2 files changed, 37 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index caa3c8c..c16d7ca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,6 +36,7 @@ drmaa/v1/ffi.scm: drmaa/v1/ffi.ffi
-e 's,drmaa-v1-ffi-llibs),(force drmaa-v1-ffi-llibs)),' -i $@
SOURCES = drmaa.scm \
+ drmaa/errors.scm \
drmaa/v1/ffi.scm \
drmaa/v1/low.scm
diff --git a/drmaa/errors.scm b/drmaa/errors.scm
new file mode 100644
index 0000000..76dcec2
--- /dev/null
+++ b/drmaa/errors.scm
@@ -0,0 +1,36 @@
+;;; Guile DRMAA --- Guile bindings for DRMAA
+;;; Copyright © 2021 Ricardo Wurmus <rekado@elephly.net>
+;;;
+;;; This file is part of Guile DRMAA.
+;;;
+;;; Guile DRMAA is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; Guile DRMAA 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 General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with Guile DRMAA. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (drmaa errors)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
+ #:export (&drmaa-error
+ drmaa-error?
+
+ &formatted-message
+ formatted-message?
+ formatted-message-string
+ formatted-message-arguments))
+
+(define-condition-type &drmaa-error &error
+ drmaa-error?)
+
+(define-condition-type &formatted-message &error
+ formatted-message?
+ (format formatted-message-string)
+ (arguments formatted-message-arguments))