]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
new bug, new branch
authorhttp://smcv.pseudorandom.co.uk/ <smcv@web>
Fri, 21 Feb 2014 17:12:17 +0000 (13:12 -0400)
committeradmin <admin@branchable.com>
Fri, 21 Feb 2014 17:12:17 +0000 (13:12 -0400)
doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn [new file with mode: 0644]

diff --git a/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn b/doc/bugs/error_handlers_with_gettext_can_clobber___36____64__.mdwn
new file mode 100644 (file)
index 0000000..0353462
--- /dev/null
@@ -0,0 +1,22 @@
+[[!template id=gitbranch name=smcv/ready/careful-eval author="[[smcv]]"]]
+[[!tag patch]]
+
+As noted in the Try::Tiny man page, eval/$@ can be quite awkward in
+corner cases, because $@ has the same properties and problems as C's
+errno. While writing a regression test for definetemplate
+in which it couldn't find an appropriate template, I received
+    
+    <span class="error">Error: failed to process template
+    <span class="createlink">deftmpl</span> </span>
+    
+instead of the intended
+    
+    <span class="error">Error: failed to process template
+    <span class="createlink">deftmpl</span> template deftmpl not
+    found</span>
+    
+which turned out to be because the "catch"-analogous block called
+gettext before it used $@, and gettext can call define_gettext,
+which uses eval.
+
+Fixed in my branch smcv/ready/careful-eval. --[[smcv]]