#ckan

/

      • mattcen has quit
      • mattcen joined the channel
      • mattcen has quit
      • mattcen joined the channel
      • mattcen has quit
      • mattcen joined the channel
      • mattcen has quit
      • oberstet joined the channel
      • mattcen joined the channel
      • smotornyuk joined the channel
      • MadsEnerginet joined the channel
      • MadsEnerginet
        Hey folks! Wondering if someone could help me out with some CKAN development of mine? I was looking at writing a plugin that could intercept exceptions, log thme in a specific way, and then let CKAN do what CKAN does (Either report 500 back to the client or show the debug info)
      • Found the IMiddleware interface, but can't find much documentation on it. Thought maybe that the "make_error_log_middleware" method could do it, but can't find any way to access the exception in that method (sys.exc-info() is just (None, None, None))
      • Any advice?
      • shellac joined the channel
      • mattcen has quit
      • Never mind. Figured it out. make_error_log_middleware is the right way to do it (or rather, it works in that method. if it's THE right way, I'm not sure). You just need to wrap webob.Request(environ).get_response(self.app) in a try statement and you'll be able to catch the exception with sys.exc_info()
      • mattcen joined the channel
      • MadsEnerginet has quit
      • tomkralidis joined the channel
      • wardi
        amercader: meeting?
      • amercader
        Hey sorry, I'm off today, it's a bank holiday here
      • wardi
        ok
      • witness has quit
      • shellac joined the channel
      • mattcen has quit
      • mattcen joined the channel
      • smotornyuk has quit
      • e0ne joined the channel
      • shellac joined the channel
      • tomkralidis has quit
      • shellac joined the channel
      • e0ne has quit
      • shellac joined the channel
      • shellac joined the channel
      • mattcen has quit
      • mattcen joined the channel
      • shellac joined the channel
      • mattcen has quit
      • mattcen joined the channel