diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-15 15:38:27 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2011-06-15 15:38:27 +0300 |
commit | 516f479a1ddb3bb783a01e9ffb20ba051243ffd0 (patch) | |
tree | baa64c57bf1cc11bed2bd894d75cd605e21c3ff9 /src/ellinika/conjugator.scm | |
parent | 3340ce32eb576ff355b83fc78a189b897b7fc424 (diff) | |
download | ellinika-516f479a1ddb3bb783a01e9ffb20ba051243ffd0.tar.gz ellinika-516f479a1ddb3bb783a01e9ffb20ba051243ffd0.tar.bz2 |
Improve error handling in conj.
* src/cgi-bin/conj.scm4: Add error handling.
* src/ellinika/conjugator.scm: Throw 'conjugator-error
instead of calling (error).
* src/ellinika/elmorph.c: Use ~A in error messages when referring to
elstrs. Guile's ~S sucks on UTF-8.
* src/ellinika/utf8scm.c: Likewise.
* style.css (.error): Output in red.
Diffstat (limited to 'src/ellinika/conjugator.scm')
-rw-r--r-- | src/ellinika/conjugator.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ellinika/conjugator.scm b/src/ellinika/conjugator.scm index 41575c2..8172686 100644 --- a/src/ellinika/conjugator.scm +++ b/src/ellinika/conjugator.scm @@ -178,7 +178,8 @@ WHERE verb=\"~A\" AND voice=\"~A\" AND thema=\"~A\"" ((elstr-suffix? verb "ομαι") (elstr-trim verb -4)) (else - (error "cannot handle ~A~%" verb)))) + (throw 'conjugator-error 'conjugator-error-input + "cannot handle ~A" (list (force-string verb)))))) (define (complement-verb-info vinfo verb voice thema) ; (format #t "COMPLEMENT ~A~%" vinfo) @@ -417,7 +418,8 @@ AND c.tense=\"~A\" AND c.flect = f.ident ORDER by fold" (else 3))) obj)))) (else - (error "invalid accent character" acc)))) + (throw 'conjugator-error 'conjugator-error-db + "invalid accent character ~A" (list acc))))) (conj-info #:flect conj) accmap))) (if (conj-info #:particle conj) |