• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Script Troubleshooting

Chapter 10. Script Troubleshooting

A script may look fine while you're working on it, but when you run it the results may surprise you: The wrong records print out in the wrong format, the script quits without doing anything, or refuses to quit at all. Sometimes an error is merely an easily fixed annoyance, like forgetting to sort a small found set before creating the script. Other times it wastes reams of paper and printing time, abandons an untrained user in an unfamiliar layout, or permanently corrupts a good database by altering records.

Although scripting looks easy (and often is), the more steps you add, the more likely it is that you've overlooked something. This is particularly true if you have conditional statements and loops. The debugging process can be challenging, especially if you're relatively new to the concept of scripting in general. The best way to prevent script errors is to assume that you're fallible. Build error-checking steps into your process, and the script will give you debugging feedback as it runs. If an error does occur, a well-written script gives you action options, branches to another part of the script or simply exits before something irretrievable happens.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint