Method: Platform::LoggedException.exception_summary

Defined in:
app/models/platform/logged_exception.rb

.exception_summary(opts = nil) ⇒ Object



188
189
190
191
192
193
194
195
196
197
198
199
# File 'app/models/platform/logged_exception.rb', line 188

def self.exception_summary(opts=nil)
  opts ||= {}
  order = opts[:order] || 'exception_class'
  where_clause = opts[:conditions] ? "where #{sanitize_sql(opts[:conditions])}" : nil
  connection.select_all(%Q{
    select exception_class, count(*)
      from #{table_name}
      #{where_clause}
      group by exception_class
      order by #{order}
  })
end