# File lib/mole/moler.rb, line 14 def check_it( context, user_id, args ) return unless ::Mole.moleable? # If exception is given record the first couple of frames if args[:boom] args[:trace] = dump_stack( args[:boom] ) args[:boom] = truncate( args[:boom].to_s ) end if ::Mole.persistent? MoleLog.log_it( context, MoleFeature::find_exception_feature( ::Mole.application ), user_id, args ) else ::Mole.logger.log_it( context, "Exception", user_id, args ) end # Send out email notification if requested Mole::EMole.deliver_exception_alerts( context, user_id, args ) if args[:email] and args[:email] == true end