ysbaddaden/prax — pull request #33 by ledbettj (2013-07-27 16:22:32+00:00)
Title: Added some additional error handling

Sorry if this is a little messy. comments/critiques welcome.

#### Log an error message to the application log if we fail to parse `config.ru`.

```
D, [2013-07-27T12:09:49.487913 #10724] DEBUG -- : Building Rack app at /home/john/Projects/test/api_server/config.ru
E, [2013-07-27T12:09:49.488078 #10724] ERROR -- : Error parsing config.ru: missing run or map statement
```

#### Logs and renders an errors to the browser if Racker fails to start (for example, using bundler but some gems specified in the `Gemfile` have not been installed)

```
I, [2013-07-27T11:58:55.509467 #6514] INFO -- : Starting app blog (/home/john/Projects/test/api_server)
D, [2013-07-27T11:58:55.511674 #6514] DEBUG -- : Spawned (6726) rbenv exec bundle exec /home/john/Projects/prax/bin/racker --server /home/john/.prax/_sockets/api_server.sock --pid /home/john/.prax/_pids/api_server.sock
E, [2013-07-27T11:58:55.912149 #6514] ERROR -- : Racker (6726) exited with code: 1
D, [2013-07-27T11:58:55.912249 #6514] DEBUG -- : Can't start application: api_server
```

Screenshot:

![prax](https://f.cloud.github.com/assets/805358/867151/718ef222-f6d8-11e2-848f-7c6632442c13.png)