Re: Re: [Webmacro-devel] Current directory metaphor for including templates
Keats Kirsch <[email protected]> Wed, 26 Apr 2006 17:06:02 -0400
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <[email protected]> |
I'm not wild about that approach.
This should be something that is handled by the EEH. Unfortunately the
EEH interface was designed for handling problems evaluating Variables,
not Directives or other Macro implementations.
I'd like to fix that by making the EEH methods take Macro arguments.
This would allow Directives like #include, and any other Macro
implementation, to delegate error handling to the EEH, just like
variables do. Then you could use an EEH implementation that does
something special with this kind of exception, e.g., return an error
string like "Failed to include file MyTemplate.wm: Error=File not found!"
Keats
Marcello H wrote:
>Perhaps another possibility for not having include problems, is to
>have a better exception handling on includes etc. (So you don't have
>to visit the wm.log in case of fire...)
>
>workaround (in pseudo-code):
>#set $includefile="myinc.inc"
>#include $includefile
>#if ($includefile != "") {
>error in includefile : $includefile
>}
>
>The last line in $includefile should then be:
>#set $includefile=""
>
>This workaround did save me a couple of times, but is a bit nasty :-)
>
>Perhaps usable, you never know who need this.
>
>Greetings,
>Marcel
>
>
>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642