How to resolve SBT problems by generating a stack trace

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 18.12, “Resolving Problems by Getting an SBT Stack Trace.”


In a Scala project, you’re trying to use SBT to compile, run, or package a project, and it’s failing, and you need to be able to see the stack trace to understand why it’s failing.

SBT errors summary plugin

The sbt-errors-summary plugin looks cool. Here’s a summary from its author:

“A simple plugin that makes the error reporter a bit more concise. I find it useful when doing refactoring: I get a lot of compilation errors, and I waste a lot of time switching between files and looking for line numbers in the error message, when I can immediately see what's wrong when looking at the faulty line.”

Drupal 6 image errors and solutions (ImageCache, ImageField, CCK)

After just creating another Drupal 6 website that uses ImageCache, ImageAPI, ImageToolkit, CCK, and ImageField, I thought I'd make some notes here about the problems I ran into when trying to use ImageField with CCK to let users upload images to my website. I encountered several very frustrating errors along the way, and here are my notes related to those errors.

Note: This blog post is about Drupal 6. Things have changed quite a bit in Drupal 7, and these tips are not likely to be helpful there.

Drupal watchdog function - How to log Drupal errors (error messages)

Drupal FAQ: How do I log Drupal errors (error messages)?

The standard way to log Drupal error messages is with the watchdog function. The watchdog function logs your messages to your database, where you can then view them from your Drupal Reports URL.

In Drupal 6 and Drupal 7 the watchdog function has this signature:

Dear Business Analyst: If you can’t count the Function Points, you’re about to enter a world of hurt

One of the great things about Function Point Analysis (FPA) is that it can be a terrific validator of the work you’re doing as a business analyst. For example, here’s one of the guidelines I came up with after I learned about FPA:

If you can’t count the Function Points when you’re about to start developing a software project, you’re about to enter a world of hurt.

Debug Ant build problems with echo statements

Ant FAQ: How to use echo commands to debug Ant build scripts.

I've been moving back and forth between a ton of different computers lately -- Mac, Linux, and Windows computers -- and I had some problems with an Ant build script. This particular Ant script is complex, and I kept making mistakes, and needed a good way to debug the build process as I set up my application on these different systems.