In the previous article, ssw_gdl starts with error messages.
Next, I executed sswdb_upgrade.pro for install of SSWDB.
Error of ON_IOERROR
In the following command, 'sswdb_upgrade' is executed.
GDL> sswdb_upgrade, /spawn, /loud
Then, the procedure show error messages in file_stat.pro and ssw_file_delete.pro on 'openr.'
% Execution halted at: FILE_STAT 69 /media/yamamoto/_dat11/ssw/gen/idl/system/file_stat.pro
Following lines are common in these procedures.
> on_ioerror,err
> openr,lun,/get_lun,files(i)
In IDL, when an error occurs in 'openr', a conditional expression 'on_ioerror' works, and then other lines are executed.
However, in GDL, this 'on_ioerror' does not work, and a procedure stop at 'openr'.
Then, I changed these lines as follows. (e.g., file_stat.pro)
> on_ioerror,err
> openr,lun,/get_lun,files(i)
> fstat_lun = fstat(lun)
> free_lun,lun
< openr,lun,/get_lun,files(i),ERROR=err1
< if err1 ne 0 then begin
< fstat_lun = fstat(1)
< fstat_lun.name=''
< fstat_lun.size=0
< endif else begin
< fstat_lun = fstat(lun)
< free_lun,lun
< endelse
fstat_lun.name and fstat_lun.size are return values of 'file_stat'
Note that, in file_stat.pro, 'free_lun' is far from 'openr'.
Using the following command, I checked 'on_ioerror' in installed procedures.
$ find /???/ssw/ -type f -print | xargs grep 'on\_ioerror' > ioerror.txt
I found 265 lines.
Several lines are explanations. But, it is very difficult to modify these lines by hand.
I have not installed all SSW procedures.
I installed SSW of GOES, SOHO, Trace, Yohkoh, and SDO.
0 件のコメント:
コメントを投稿