redding/deas — pull request #57 by kellyredding (2013-05-16 05:33:17+00:00)
Title: raise custom err if creating a new server without setting the `root`

First off this defines a bunch of deas-specific runtime error exception
classes. This includes a `ServerRootError` class with a custom msg
that is intended to be raised when defining a server with no `root`.

The other part of this adds a check for a `nil` root when creating
a new server and raises the custom exception.

All this is to raise a friendly exception when (the only) required
configs are not set. Right now `root` is the only setting required.

Before:

```
lib/deas/server.rb:47:in `initialize': undefined method `join' for nil:NilClass (NoMethodError)
```

After:

```
lib/deas/server.rb:69:in `new': server `root` not set but required (Deas::ServerRootError)
```

@jcredding this came up when I tried to whip up a vanilla Deas app for a quick test. That error it originally raised wasn't helpful at all - thus this PR. Ready for review.