[Thread Prev][Thread Next][Index]

Re: Error messages of the LAS


LAS does trap some internal error messages so that it can spit out user friendly error messages.  For all the rest, however, we've left the programmer friendly debugging information.  We agree that this is not very helpful for the end user and perhaps may frighten some of them away.

You can modify the way that errors are handled in LAS by modifying the code in las/server/LAS/Server.pm.  If you search for 'sub handle_errors' you will find a BEGIN block that takes an error message, checks to see if it recognizes any strings in that message and sends the user an appropriate response.  If no recognized strings are found, the error message is returned with the LAS transcript appended.

It should be straightforward for you to modify this block of code so that you send back a standard response by default.  You could also modify the LAS::Server::Error package in this module so that the LAS transcript is not appended.  This would greatly simplify the output.

Although these are straightforward changes, you should save the changes you make to a backup file.  The Server.pm file is part of the 'core' LAS code and we don't expect you to modify it.  If you use CVS to update your LAS installation, this file, and your changes, will be overwritten.

Let me know if you need some more guidance in making the changes you want.

-- Jon

Tony Jolibois wrote:
        Dear all,

Is it possible to change the error messages of the LAS ?
We think that these messages are not explicit for a final user.

For example :

Adding an acceptable error string: "*** NOTE: ".
FERRET v5.50
Linux 2.4.3-12smp - 01/15/03
29-Aug-03 11:02

yes? cancel mode verify
yes? cancel mode interp
yes? set mem/size=127
Cached data cleared from memory
yes? canc data/all
yes? go std_initialize "
http://mersea.nersc.no/dodsC/c1_topaz_best_agg" "1" "1" "temperature"
yes? set axis/modulo `temperature[d=1],return=xaxis`
yes? set region/x="-98.5":"10.0"/y="10.0":"65.0"/z="5":"5"/t="16-Aug-2003":"16-Aug-2003"
yes? set win/size=.5
yes? set win/asp=0.76036866359447
yes? GO "/tmp/lasgo48708988013.jnl"
  ** netCDF error: Invalid Argument
is this a CDF file ?
set data "
Command file, command group, or REPEAT execution aborted

We can just say here that the dataset requested is not accessible.

Tony Jolibois
CLS, Direction Océanographie Spatiale
Département Produits et Services
Internet: http://www.cls.fr

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement