Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
PROGRAMMING POWER
Getting a handle on LotusScript error handling
By Tony Patton

One part of Domino development that's often overlooked is error handling. While errors may be caught, many developers may not understand the nature of the error. For example, a bit of LotusScript code may return the error 4001, but where's a description of this error?

The answer lies in a few text files in your base Notes directory (c:\notes). The following list contains the files included with a standard install.

  • lsconst.lss is a list of constants (like the ones used with MessageBox).

  • lsxuierr.lss lists user interface errors.

  • lsxbeerr.lss is a list of more errors.

  • lserr.lss is a compilation of basic LotusScript errors.

You can open these files in your favorite editor and search for the error number to get a better idea of the problem. Now, the additional information found in these files isn't exactly user-friendly, but it does provide more clues.

For example, error 4001 includes the following information: lsERR_SYS_OUT_OF_MEMORY. It looks like a memory problem that may be caused by the code--check the object cleanup or data structure sizes.

In LotusScript, you can utilize these numbers with the On Error statement. The following line tells the code to jump to the designated code label when error 4001 is encountered:

On Error 4001 Goto Handle4001Error

The Java try/catch block may be used as well. By using the error code files above, tracking down the cause of your errors may just go a little smoother and your life a little easier.

DominoPower Contributing Editor Tony Patton is a Domino enthusiast with plenty of experience in Domino, Java, XML, and any other hot buzzword. He has written two books (Practical LotusScript and Domino Development With Java) and is a long-suffering Philadelphia sports fan. Drop him a line at aspatton@bellsouth.net.


Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.

Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.

Learn how to easily clean up your address book.

-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login