Skip to content

Commit

Permalink
add check for file load
Browse files Browse the repository at this point in the history
  • Loading branch information
mrb committed Jun 12, 2011
1 parent 933e0ac commit 1cbc26c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion config/environment.rb
Expand Up @@ -2,7 +2,14 @@
require File.expand_path('../application', __FILE__)

# Set ENV['DUMP'] as such:
# ENV['DUMP'] = File.expand_path("heap.dump")
ENV['DUMP'] = File.expand_path("heap.dump")

# Quick error class for config issue and check for dump file loading
class ConfigurationError < StandardError; end

if !ENV['DUMP']
raise ConfigurationError, "Set ENV variable for dump file."
end

# Initialize the rails application
Gauge::Application.initialize!

0 comments on commit 1cbc26c

Please sign in to comment.