Permalink
Browse files

template header issued before an error or when template processing be…

…gins
  • Loading branch information...
1 parent 259d7e9 commit 4de2b9ee9c3cfee4dc45bccb4283e017e3c21288 @kburtch committed Mar 2, 2014
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/parser.adb.orig
View
@@ -8434,31 +8434,36 @@ begin
end if;
-- display any error message
if error_found then
- if hastemplate then -- DEBUG
- cgi.put_cgi_header( "Content-type: text/html" );
- end if;
+ putTemplateHeader( templateHeader );
+ --if hastemplate then -- DEBUG
+ -- putTemplateHeader( templateHeader ); -- cgi.put_cgi_header( "Content-type: text/html" );
+ --end if;
put_line( standard_error, fullErrorMessage );
-- may or may not have a template at this point, so check
if hasTemplate then
put_line( fullTemplateErrorMessage );
end if;
end if;
if length( depreciatedMsg ) > 0 then -- pragma depreciated?
+ putTemplateHeader( templateHeader );
warn( to_string( depreciatedMsg ) );
end if;
if restriction_annotations_not_optional and not annotationsFound then
-- pragma restriction( annotations_not_optional )
+ putTemplateHeader( templateHeader );
warn( "annotations are required but missing" );
end if;
if restriction_no_annotate_todos and annotationTodoFound then
-- pragma restriction( annotations_no_todos )
+ putTemplateHeader( templateHeader );
warn( "annotation todo found but none expected" );
end if;
if processingTemplate and not error_found then -- doing a template
if verboseOpt then
Put_Trace( "Processing template " & to_string( templatePath ) );
end if;
begin
+ putTemplateHeader( templateHeader );
processTemplate;
exception
when STATUS_ERROR =>

0 comments on commit 4de2b9e

Please sign in to comment.