comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: trapping type conversion errors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: trapping type conversion errors [message #22310 is a reply to message #22296] Wed, 01 November 2000 14:59 Go to previous messageGo to previous message
George Constantinides is currently offline  George Constantinides
Messages: 16
Registered: July 2000
Junior Member
William,

The error generated in your example is an IO error and can be trapped with
ON_IOERROR. It is a bit of a pain that CATCH will not catch this type of
error, but all is not lost.


PRO junk
; catch,error
; IF error NE 0 THEN BEGIN
; message,!error_state.msg,/info
; return
; ENDIF

ON_IOERROR, bad_data

t = ['01','aa']
tt = fix(t,type=2)
;print,"I'm here"
;message,!error_state.msg,/info

; help,!error_state,/st

Return

bad_data:
help,!error_state,/st

END


Regards,

George Constantinides
email: GeorgeC@mhl.nsw.gov.au
URL: http://www.mhl.nsw.gov.au
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Old Timers ??
Next Topic: IDLWAVE 4.5

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:18:48 PDT 2025

Total time taken to generate the page: 0.56112 seconds