ysbaddaden / prax

Rack proxy server for development
http://ysbaddaden.github.io/prax/
Other
475 stars 49 forks source link

Added some additional error handling #33

Closed ledbettj closed 10 years ago

ledbettj commented 11 years ago

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, if we're 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

ysbaddaden commented 11 years ago

Thanks for the patch! It looks great and to the point.

I'll merge it as soon as #37 is sorted out.

ledbettj commented 11 years ago

Rebased off master

ledbettj commented 10 years ago

Don't think this is needed anymore.