[DataAccess] Log database query errors in the DatabaseAccessObject

Review Request #63 — Created Feb. 18, 2013 and submitted

pprkut
Lunr
pprkut:db_support
lunr
This makes use of the new query helper methods to log errors in case a query fails.

This depends on http://reviews.lunr.nl/r/62/
Unit Tests
  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
pprkut
pprkut
leo
  1. Ship It!
  2. 
      
dinos
  1. 
      
  2. Just a question.
    The {query} inside the string is referring to the the index "query of the $context array", right? 
    Is the error going to match the value inside the brackets? Something like printf ?
    Also in the first value {query}; you always (also in the next lines that you use this style)close with a semicolon, while you don't for {error}
    1. The {keyword} syntax is part of the PSR-3 spec. You can check there for details. Out logger implementations handle that in a interpolate_message() method.
      The semicolon has nothing to do with that syntax. {query} is a SQL query, but the query string we pass is not terminated, so we add the semicolon to have a terminated SQL query in the logs for easier copy & paste.
    2. Thanks for the explanation!
    3. you're welcome :)
  3. 
      
dinos
  1. Ship It!
  2. 
      
dinos
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master
Loading...