diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-03-06 21:14:32 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-03-06 21:14:32 (GMT) |
commit | 8a03f0daaee5e3981cd4f9f69b3841694e8dc0be (patch) | |
tree | ec4faf7f1f6ae1126b2d80e9f2b15c3322626e3c /ds9/library/error.tcl | |
parent | f8e0575309361e2f2cb476d9ed4eb525c3b89b18 (diff) | |
download | blt-8a03f0daaee5e3981cd4f9f69b3841694e8dc0be.zip blt-8a03f0daaee5e3981cd4f9f69b3841694e8dc0be.tar.gz blt-8a03f0daaee5e3981cd4f9f69b3841694e8dc0be.tar.bz2 |
add ds9 parsers
Diffstat (limited to 'ds9/library/error.tcl')
-rw-r--r-- | ds9/library/error.tcl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ds9/library/error.tcl b/ds9/library/error.tcl index 5bd4bbf..fac9b8a 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 "$msg:" + puts stderr "$yy_current_buffer" + puts stderr [format "%*s" $index_ ^] + 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 |