Lasso Soft Inc. > Home

  • Articles

Mining the Error Stack for Meaning

Presented at Lasso Developer Conference May 2012 by Steve Piercy

As web application developers, we're in the business of creating new features, improving what works, and fixing what is broken.  Wouldn't it be nice if you could spend all of your time creating awesome stuff?

Unfortunately, it is not always awesome.

For example, you may be familiar with the article I wrote on file permissions for Lasso 8.[1]  This article came about from my frustration with dealing with file permissions.  It is not a simple matter, and it is very easy to miss a detail that can lay waste to an afternoon of productivity.  It's also easy to misinterpret or not understand the error messages that may be returned.

I'm about to show you that it does not have to be that way.

I'll share some of the things I do to extract meaning from the error stack.  I'll discuss strategies, tools, and resources to get you into the pub in time for happy hour, into the garden before the sun sets, or time to go jogging with your dog.


Most of the work is defining the problem.

Have you ever made a quick change to a file on a production server to fix a problem, only to find that it does not fix it?  So you make another change, reload, and the problem persists?  So you repeat this process several times, trying various things without success.  Soon you reach a certain point of frustration.

The characters portrayed in this clip bear no resemblance to any technical support staff or customer seeking technical support, living or dead.

  • Repeat the problem
  • What did you do?
  • List all the steps
  • Expectations
  • What did you expect to happen?
  • Observations
  • What did you observe?
  • Error messages and codes
  • Logs
  • Screenshots and screensharing
  • Process of elimination

"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth."
Arthur Conan Doyle - Sherlock Holmes

Problems When Defining Problems

  • Failure to verify assumptions
  • Network operating normally
  • Hardware issues
  • Software issues
  • Wetware issues
  • Jumping to conclusions
  •  "It doesn't work."
  •   "Define 'it'."
  •    "Define 'work'."
  • Ignoring evidence
  • "Did you really...?"  "Yes, I did."
  • "Fixing" the problem before it is defined
  • Randomly trying stuff can introduce new errors
  • Idiots

    There are 6 error types

  •   Web server
  •   Syntax
  •  Action (request)
  •  Action results (response)
  •   Logic
  •   Security and permissions

Two Logical error examples:

Example 1.


Example 2.

var(moose = 1)
while($moose > 0) => {
    $moose += 1


Security and permissions Errors

Lack of permission shows within the error message 

  • file_write.html

Web Server level errors

  •   Errors in Operating system
    •   os_process
    •   ImageMagick
    •   java
  •   installation



Error handling in Lasso 8

  • Error page scope in Lasso 8 includes:

/Applications/Lasso Professional 8/LassoAdmin/error.lasso (default)

/Applications/Lasso Professional 8/LassoSites/default-1/error.lasso

/error.lasso (website root)

Apache mod_rewrite, etc.

Error handling in Lasso 9

  • Error page scope in Lasso 9 includes:

Apache mod_rewrite, etc.

Error handling tips and techniques: (Lasso 8 based, but many of the principles still apply)

Error tags and methods

Make use of the available error tags and methods.

Refer to the LassoGuide

   error_currenterror includes:

  •    fail
  •    fail_if
  •    handle
  •    handle_error
  •    protect

  setting the error level to give you the level you need

  •   admin
  •   lasso_errorreporting('none|minimal|full',-local)

Results of Error level: NONE


Results of Error level: MINIMAL


Results of Error level: FULL

Setting up the Error Reporting in Lasso 8.x

Setting up the Error Reporting in Lasso 8.x


Setting up Error Logging in Laso 8.x

Setting up Error Logs in Lasso 8.x

Viewing the logs under Lasso 8.x

/Applications/Lasso Professional 8/LassoErrors.txt

/Applications/Lasso Professional 8/LassoSites/default-1/LassoErrors.txt


Console/Debug Mode under Lasso 8.x

Start Lasso8Service in console or debug mode from the command line.


/Applications/Lasso\ Professional\ 8/Tools/consoleLassoService.command


Lasso 9 Error Logs

Setting up Error Logging under Lasso 9

See also and

To view locally on your server

/private/var/lasso/instances/default/lasso.out.txt    **

** lasso.out.txt == lasso_logbook.txt + startup messages

Accessing the Lasso 9 Error Logs and Logbook

Settings for Lasso 9 Error Logs


To view the Lasso 9 Log in realtime:

sudo tail -F -50 /private/var/lasso/instances/default/lasso.out.txt

Console/Debug Mode for Lasso 9

Start lassoserver in console or debug mode from the command line.

LASSO9_PRINT_FAILURES=1 sudo ~lasso/LassoExecutables/lassoserver
0: no output
1: verbose output
2: succinct output

Parsing the Lasso 9 Error Stack


Additional Resources:

Language Guide Appendix A Error Codes


Activity Monitor
Screen Sharing tools

  • iChat
  • Skype
  • TeamViewer

Author: Steve Piercy
Created: 25 May 2012
Last Modified: 26 Mar 2014


No comments found
You must be logged in to comment.

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home



©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft