aboutsummaryrefslogtreecommitdiffstats
path: root/c_utils.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c_utils.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/c_utils.go b/c_utils.go
index 4af14de..72761d8 100644
--- a/c_utils.go
+++ b/c_utils.go
@@ -95,3 +95,13 @@ func c_die(str string, err error) {
fmt.Fprintf(os.Stderr, "\n")
os.Exit(1)
}
+
+func c_error_mode(msg string, err error, ui *HardUI) {
+ ui.mode = ERROR_MODE
+ err_str := ""
+ if err != nil {
+ err_str = fmt.Sprintf("%v", err)
+ }
+ ui.err[ERROR_MSG] = msg
+ ui.err[ERROR_ERR] = err_str
+}