Commits

Mike Bayer committed e77c892

- added an IOError catch for source file not found in RichTraceback
exception reporter [ticket:51]

Comments (0)

Files changed (2)

 - fixed expressions and page tag arguments and with embedded
 newlines in CRLF templates, follow up to [ticket:16], thanks
 Eric Woroshow
+- added an IOError catch for source file not found in RichTraceback
+exception reporter [ticket:51]
 
 0.1.8
 - variable names declared in render methods by internal 

lib/mako/exceptions.py

                     self.lineno = new_trcback[l][5]
                     break
             else:
-                self.source = file(new_trcback[-1][0]).read()
+                try:
+                    self.source = file(new_trcback[-1][0]).read()
+                except IOError:
+                    self.source = ''
                 self.lineno = new_trcback[-1][1]
         return (type, value, new_trcback)