summaryrefslogtreecommitdiffstats
path: root/ds9/library/error.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'ds9/library/error.tcl')
-rw-r--r--ds9/library/error.tcl18
1 files changed, 18 insertions, 0 deletions
diff --git a/ds9/library/error.tcl b/ds9/library/error.tcl
index 5bd4bbf..afed4ea 100644
--- a/ds9/library/error.tcl
+++ b/ds9/library/error.tcl
@@ -52,6 +52,24 @@ proc ProcessMessage {level message} {
}
}
+proc ParserError {msg yycnt yy_current_buffer index_} {
+ global ds9
+
+ switch -- $ds9(msg,src) {
+ xpa -
+ hv -
+ samp {
+ Error "$msg: [lindex $yy_current_buffer [expr $yycnt-1]]"
+ }
+ default {
+ puts stderr "[string range $yy_current_buffer 0 80]"
+ puts stderr [format "%*s" $index_ ^]
+ puts stderr "$msg:"
+ QuitDS9
+ }
+ }
+}
+
# here is where errors from within the canvas widgets
# will try to get our attention.
# XPA, HV, and SAMP will have already seen any problems