brownplt / ZZZ-captain-teach

Set sail for Learning Island! Deprecated and no longer maintained
5 stars 1 forks source link

Inscrutible error messages percolated from rugged #1

Open dbp opened 11 years ago

dbp commented 11 years ago

When I try to rake db:seed when the assignments directory is not a git repository, I get no relevant error message.

I get something like:

rake aborted!
/home/dbp/code/captain-teach/src/assignments
/home/dbp/code/captain-teach/app/app/models/user_repo.rb:44:in `rescue in init'
/home/dbp/code/captain-teach/app/app/models/user_repo.rb:35:in `init'
/home/dbp/.rvm/gems/ruby-1.9.3-p362@captain-teach/gems/activesupport-4.0.0.rc1/lib/active_support/callbacks.rb:394:
in `_run__565035237__initialize__callbacks'
...

Now the first two lines in the backtrace indicate where the error came from, but it's still a little ridiculous. If I replicate the command that is to blame,

captains_log = UserRepo.create!(:path => ASSIGNMENTS_PATH)

At the console, I get an appropriate message.

UserRepo::NotAGitRepo: /home/dbp/code/captain-teach/src/assignments
...

This is probably not something we can fix, just good to keep track of.