Presented at Lasso Developer Conference May 2012 by Steve Piercy
web@StevePiercy.com
https://github.com/stevepiercy
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.
https://www.youtube.com/watch?v=D58LpHBnvsI&feature=player_detailpage#t=2s
The characters portrayed in this clip bear no resemblance to any technical support staff or customer seeking technical support, living or dead.
"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth."
Arthur Conan Doyle - Sherlock Holmes
There are 6 error types
Example 1.
if(var('foo')); 'true'; else; 'false'; /if;
Example 2.
var(moose = 1) while($moose > 0) => { $moose += 1 }
Lack of permission shows within the error message
/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.lasso
/another/website/path/error.lasso
Apache mod_rewrite, etc.
Error handling tips and techniques: (Lasso 8 based, but many of the principles still apply)
http://devblog.jasonhuck.com/2007/12/31/error-management-techniques-for-lasso/
Make use of the available error tags and methods.
Refer to the LassoGuide http://lassoguide.com/language/error-handling.html
error_currenterror includes:
setting the error level to give you the level you need
Results of Error level: NONE
Results of Error level: MINIMAL
Results of Error level: FULL
/Applications/Lasso Professional 8/LassoErrors.txt
/Applications/Lasso Professional 8/LassoSites/default-1/LassoErrors.txt
/custom/path/to/error_file.txt
Start Lasso8Service in console or debug mode from the command line.
/Applications/Lasso\ Professional\ 8/Tools/consoleLassoService.command
See also lassoguide.com/operations/logging.html and lassosoft.com/Lasso-9-Server-Administration#heading46
To view locally on your server
/private/var/lasso/instances/default/lasso_logbook.txt
/private/var/lasso/instances/default/lasso.out.txt **
/private/var/lasso/instances/default/lasso.err.txt
** lasso.out.txt == lasso_logbook.txt + startup messages
sudo tail -F -50 /private/var/lasso/instances/default/lasso.out.txt
http://lassosoft.wiki.zoho.com/Debugging-and-Troubleshooting.html
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
http://www.lassosoft.com/Language-Guide-Defining-Methods
Language Guide Appendix A Error Codes
L-Debug
Activity Monitor
Wireshark
Screen Sharing tools
Author: Steve Piercy
Created: 25 May 2012
Last Modified: 26 Mar 2014
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft