summaryrefslogtreecommitdiff
path: root/error_buffer.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-23 17:11:34 +0300
committerWolfy-J <[email protected]>2018-06-23 17:11:34 +0300
commit0d926f48f215eedb3f36e991c267301da7906574 (patch)
tree70fc685827e97c35cdde6a6dade6156bb8c7aa97 /error_buffer.go
parent80bd89f91fd0055579717f3cc65b39176eb09000 (diff)
realtime error handling and displaying
Diffstat (limited to 'error_buffer.go')
-rw-r--r--error_buffer.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/error_buffer.go b/error_buffer.go
index 8c240e26..78effc9b 100644
--- a/error_buffer.go
+++ b/error_buffer.go
@@ -47,7 +47,9 @@ func (eb *errBuffer) Write(p []byte) (int, error) {
eb.buf = append(eb.buf, p...)
for msg := eb.fetchMsg(); msg != nil; msg = eb.fetchMsg() {
- eb.lsn(EventStderrOutput, msg)
+ if eb.lsn != nil {
+ eb.lsn(EventStderrOutput, msg)
+ }
}
return len(p), nil