marylinh / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

JSError django exception reporter compatibility #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This patch allows django to show javascript errors in html tracebacks. 
Without __unicode__ method, no exc_value strings shown.

-begin patch-
Index: PyV8.py
===================================================================
--- PyV8.py (revision 201)
+++ PyV8.py (working copy)
@@ -18,6 +18,9 @@

     def __str__(self):
         return str(self._impl)
+    
+    def __unicode__(self):
+        return unicode(self._impl)

     def __getattribute__(self, attr):
         impl = super(JSError, self).__getattribute__("_impl")
-end patch-

Original issue reported on code.google.com by gauss...@gmail.com on 12 Jan 2010 at 11:07

GoogleCodeExporter commented 9 years ago
Thanks for your pach, merged in r203.

Original comment by flier...@gmail.com on 13 Jan 2010 at 9:22

GoogleCodeExporter commented 9 years ago
Ok now, thank you.

Original comment by gauss...@gmail.com on 14 Jan 2010 at 3:17

GoogleCodeExporter commented 9 years ago
Thanks

Original comment by flier...@gmail.com on 15 Jan 2010 at 2:13