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) (unidiff)
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 @@
15</%impl> 15</%impl>
16%%var string message; 16%%var string message;
17%%var string root_source; 17%%var string root_source;
18%%var string root_intermediate; 18%%var string root_intermediate;
19%%var string root_so; 19%%var string root_so;
20%%var string component; 20%%var string component;
21%%var int line_number = -1; 21%%var int line_number = -1;
22%%var const exception* exception_caught; 22%%var const exception* exception_caught;
23<%code> 23<%code>
24 __SCIF->headers.clear(); 24 __SCIF->headers.clear();
25 __SCIF->out->seekp(0); 25 __SCIF->out->seekp(0);
26 int magic = _magic; 26 int magic = _magic;
27 va_list va = _args; 27 va_list va; va_copy(va,_args);
28 switch(magic) { 28 switch(magic) {
29 case sitecing::__magic_compile_error: 29 case sitecing::__magic_compile_error:
30 message = va_arg(va,const char*); 30 message = va_arg(va,const char*);
31 root_source = va_arg(va,const char*); 31 root_source = va_arg(va,const char*);
32 root_intermediate = va_arg(va,const char*); 32 root_intermediate = va_arg(va,const char*);
33 root_so = va_arg(va,const char*); 33 root_so = va_arg(va,const char*);
34 component = va_arg(va,const char*); 34 component = va_arg(va,const char*);
35 break; 35 break;
36 case sitecing::__magic_preprocess_error: 36 case sitecing::__magic_preprocess_error:
37 message = va_arg(va,const char*); 37 message = va_arg(va,const char*);
38 root_source = va_arg(va,const char*); 38 root_source = va_arg(va,const char*);
39 root_intermediate = va_arg(va,const char*); 39 root_intermediate = va_arg(va,const char*);
@@ -317,24 +317,25 @@
317 <% sitecing::html_escape(message,sitecing::html_escape_br) %> 317 <% sitecing::html_escape(message,sitecing::html_escape_br) %>
318 </div> 318 </div>
319 </div> 319 </div>
320</%method> 320</%method>
321<%codemethod string strip_roots(const string& filename) %> 321<%codemethod string strip_roots(const string& filename) %>
322 string np = konforka::normalize_path(filename); 322 string np = konforka::normalize_path(filename);
323 try{ 323 try{
324 return sitecing::strip_prefix(np,root_source); 324 return sitecing::strip_prefix(np,root_source);
325 }catch(sitecing::utility_no_prefix& e){ } 325 }catch(sitecing::utility_no_prefix& e){ }
326 try{ 326 try{
327 return sitecing::strip_prefix(np,root_intermediate); 327 return sitecing::strip_prefix(np,root_intermediate);
328 }catch(sitecing::utility_no_prefix& e){ } 328 }catch(sitecing::utility_no_prefix& e){ }
329 return np;
329</%codemethod> 330</%codemethod>
330<%codemethod string remove_roots(const string& str) %> 331<%codemethod string remove_roots(const string& str) %>
331 string rv = str; 332 string rv = str;
332 string::size_type rp; 333 string::size_type rp;
333 string::size_type rl = root_source.length(); 334 string::size_type rl = root_source.length();
334 while((rp=rv.find(root_source))!=string::npos) { 335 while((rp=rv.find(root_source))!=string::npos) {
335 rv.erase(rp,rl); 336 rv.erase(rp,rl);
336 } 337 }
337 rl = root_intermediate.length(); 338 rl = root_intermediate.length();
338 while((rp=rv.find(root_intermediate))!=string::npos) { 339 while((rp=rv.find(root_intermediate))!=string::npos) {
339 rv.erase(rp,rl); 340 rv.erase(rp,rl);
340 } 341 }