summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2006-12-06 17:16:12 (UTC)
committer Michael Krelin <hacker@klever.net>2006-12-06 17:16:12 (UTC)
commit480c890f78b9fcf46e006ece0eab01f946ef6f59 (patch) (side-by-side diff)
tree2b80ff7d1f1facce1dfe08983dea95e92e81a9aa
parenta22cf56603ca89efb73429fd3797a775ca908cff (diff)
downloadsitecing-480c890f78b9fcf46e006ece0eab01f946ef6f59.zip
sitecing-480c890f78b9fcf46e006ece0eab01f946ef6f59.tar.gz
sitecing-480c890f78b9fcf46e006ece0eab01f946ef6f59.tar.bz2
fixes to exception_dev component
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--components/exception_dev3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/exception_dev b/components/exception_dev
index d62f462..49b7f45 100644
--- a/components/exception_dev
+++ b/components/exception_dev
@@ -15,25 +15,25 @@
</%impl>
%%var string message;
%%var string root_source;
%%var string root_intermediate;
%%var string root_so;
%%var string component;
%%var int line_number = -1;
%%var const exception* exception_caught;
<%code>
__SCIF->headers.clear();
__SCIF->out->seekp(0);
int magic = _magic;
- va_list va = _args;
+ va_list va; va_copy(va,_args);
switch(magic) {
case sitecing::__magic_compile_error:
message = va_arg(va,const char*);
root_source = va_arg(va,const char*);
root_intermediate = va_arg(va,const char*);
root_so = va_arg(va,const char*);
component = va_arg(va,const char*);
break;
case sitecing::__magic_preprocess_error:
message = va_arg(va,const char*);
root_source = va_arg(va,const char*);
root_intermediate = va_arg(va,const char*);
@@ -317,24 +317,25 @@
<% sitecing::html_escape(message,sitecing::html_escape_br) %>
</div>
</div>
</%method>
<%codemethod string strip_roots(const string& filename) %>
string np = konforka::normalize_path(filename);
try{
return sitecing::strip_prefix(np,root_source);
}catch(sitecing::utility_no_prefix& e){ }
try{
return sitecing::strip_prefix(np,root_intermediate);
}catch(sitecing::utility_no_prefix& e){ }
+ return np;
</%codemethod>
<%codemethod string remove_roots(const string& str) %>
string rv = str;
string::size_type rp;
string::size_type rl = root_source.length();
while((rp=rv.find(root_source))!=string::npos) {
rv.erase(rp,rl);
}
rl = root_intermediate.length();
while((rp=rv.find(root_intermediate))!=string::npos) {
rv.erase(rp,rl);
}