Opened 17 years ago

Closed 17 years ago

#65 closed defect (fixed)

diagnostics of xfile

Reported by: pinsard Owned by: somebody
Priority: minor Milestone:
Component: component1 Version:
Keywords: diagnostic debug release revision Cc:

Description

Diagnostics of wrong calling sequence of xfile might be more explicit to help debug.

Here are some examples :

IDL> xfile,fdsfds
% Compiled module: XFILE.
% Compiled module: REPORT.
% Compiled module: STR_SEP.
% Compiled module: ROUTINE_NAME.
% L.39 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro: Input parameter must be a string and not a UNDEFINED

No release, no reminder of the call.

Something like that

% L.39 /Users/smasson/SAXO_RD/SRC/Utilities/xfile.pro rev239:
Input parameter of xfile was : fdsfds
Input parameter must be a file.

may ease debug.

IDL>  xfile 
% L.39 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro: Input parameter must be a string and not a UNDEFINED

should be replaced by

% L.39 /Users/smasson/SAXO_RD/SRC/Utilities/xfile.pro rev239:
No input parameter for xfile.
Input parameter must be a file.
IDL>  xfile, 'dqsdqs'
% Compiled module: XDISPLAYFILE.
% Compiled module: XMANAGER.
IDL> }}}

no error is written after IDL prompt. A window "NOT FOUND" opens with the following message 
{{{
FILE_LINES: Error opening file. File: NOT FOUND
 Unable to display NOT FOUND
}}}

This window is useless. Message should be written after the prompt like this for example :
{{{
% L.39 /Users/smasson/SAXO_RD/SRC/Utilities/xfile.pro rev239:
Input parameter of xfile was : 'dqsdqs'
Input parameter must be a file.
}}}

Change History (1)

comment:1 Changed 17 years ago by pinsard

  • Keywords revision added
  • Resolution set to fixed
  • Status changed from new to closed

After some bug fix and arguments checking in xfile (and in xhelp which is similar) and improvements of report,
we have some more explicit diagnostics. see changeset:266 and changeset:269

 IDL> xfile, 'dqsdqs'
% L.71 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro 266: Input parameter filename : dqsdqs
% L.71 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro 266: dqsdqs does not exist ...
IDL> xfile,fdsfds
% L.53 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro 266: No input parameter filename
% L.53 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro 266: Usage : xfile, filename, _EXTRA = ex
IDL> xfile
% L.46 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro 266: No input parameter
% L.46 /Users/fplod/SAXO_DIR_ws/SRC/Utilities/xfile.pro 266: Usage : xfile, filename, _EXTRA = ex
Note: See TracTickets for help on using tickets.