aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-04 19:37:29 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-04 19:37:29 +0200
commit23bb093fadf597411f81303371ca9f1ef9f15619 (patch)
tree4d6edc4a44f5365586b27ec9c7ff9b782feef2d0
parentAll warning procedures now uses warning system. (diff)
downloadcalp-23bb093fadf597411f81303371ca9f1ef9f15619.tar.gz
calp-23bb093fadf597411f81303371ca9f1ef9f15619.tar.xz
Replace direct output to current-error-port with warnings.
-rw-r--r--module/entry-points/terminal.scm1
-rw-r--r--module/output/ical.scm7
-rw-r--r--module/vcomponent/parse.scm3
-rw-r--r--module/vcomponent/recurrence/generate.scm7
4 files changed, 7 insertions, 11 deletions
diff --git a/module/entry-points/terminal.scm b/module/entry-points/terminal.scm
index a2c41f44..7f816e94 100644
--- a/module/entry-points/terminal.scm
+++ b/module/entry-points/terminal.scm
@@ -24,7 +24,6 @@
(let ((date (or (and=> (option-ref opts 'date #f) parse-freeform-date)
(current-date))))
- ;; (format (current-error-port) "len(events) = ~a~%" (stream-length events))
(with-vulgar
(lambda () (main-loop date))))
)
diff --git a/module/output/ical.scm b/module/output/ical.scm
index 098d4e90..aa1d030b 100644
--- a/module/output/ical.scm
+++ b/module/output/ical.scm
@@ -67,10 +67,9 @@
(lambda (err caller fmt args call-args)
(define fallback-string
(with-output-to-string (lambda () (display value))))
- (format (current-error-port)
- "WARNING: key = ~a, caller = ~s, call-args = ~s~%~k~%Falling back to ~s~%"
- key caller call-args fmt args
- fallback-string)
+ (warning "key = ~a, caller = ~s, call-args = ~s~%~k~%Falling back to ~s"
+ key caller call-args fmt args
+ fallback-string)
fallback-string
)))
diff --git a/module/vcomponent/parse.scm b/module/vcomponent/parse.scm
index a3e88816..b5bb17e9 100644
--- a/module/vcomponent/parse.scm
+++ b/module/vcomponent/parse.scm
@@ -355,8 +355,7 @@ row ~a column ~a ctx = ~a
;; TODO Also make this grouping when reading in a whole
;; icalendar-file (one with multiple events)
(case (length events)
- [(0) (format (current-error-port)
- "WARNING: No events in component~%~a~%"
+ [(0) (warning "No events in component~%~a"
(attr item 'X-HNH-FILENAME))]
[(1)
(let ((child (car events)))
diff --git a/module/vcomponent/recurrence/generate.scm b/module/vcomponent/recurrence/generate.scm
index 1ff3cc49..70d21be1 100644
--- a/module/vcomponent/recurrence/generate.scm
+++ b/module/vcomponent/recurrence/generate.scm
@@ -7,6 +7,7 @@
#:use-module (ice-9 match)
#:use-module (util)
+ #:use-module (util exceptions)
#:use-module (vcomponent base)
#:use-module (vcomponent recurrence internal)
#:use-module (vcomponent recurrence parse)
@@ -163,10 +164,8 @@
;; just mention the current part. Handle this
stream-null))))
(lambda (err . args)
- (format (current-error-port)
- "\x1b[0;31mError\x1b[m while parsing recurrence rule (ignoring and continuing)~%~a ~s~%~a~%~%"
- err args
- (attr event 'X-HNH-FILENAME))
+ (warning "while parsing recurrence rule ~%~a ~s~%~a"
+ err args (attr event 'X-HNH-FILENAME))
(stream ; event
)
)))