From: Neil Smith Date: Wed, 18 Jul 2012 08:01:29 +0000 (+0100) Subject: Added exceptions and logger X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;h=cc304c33f14c5aceb2f6ed1133d64b45ee8546e7;p=erd-marker.git Added exceptions and logger --- diff --git a/.gitignore b/.gitignore index 63a685e..8628242 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,12 @@ doc # jeweler generated pkg +# simplecov +coverage + +# log files +.log + # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore: # # * Create a file at ~/.gitignore diff --git a/lib/erd_handler/exceptions.rb b/lib/erd_handler/exceptions.rb new file mode 100644 index 0000000..ec38c4d --- /dev/null +++ b/lib/erd_handler/exceptions.rb @@ -0,0 +1,3 @@ +module ErdHandler + class InvalidErdFile < ArgumentError; end; +end \ No newline at end of file diff --git a/lib/erd_handler/logger.rb b/lib/erd_handler/logger.rb new file mode 100644 index 0000000..2665077 --- /dev/null +++ b/lib/erd_handler/logger.rb @@ -0,0 +1,6 @@ +module ErdHandler + #$ERD_LOGGER = Logger.new(STDERR) + $ERD_LOGGER = Logger.new('erd.log') + #$ERD_LOGGER.level = Logger::WARN + $ERD_LOGGER.level = Logger::DEBUG +end