mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 17:09:27 +02:00
* Generate error-message if WriteContent returns nil
git-svn-id: trunk@8035 -
This commit is contained in:
parent
9a8aa52cc5
commit
4a649f5b74
@ -192,6 +192,7 @@ Uses dbugintf;
|
|||||||
|
|
||||||
resourcestring
|
resourcestring
|
||||||
SErrRequestNotHandled = 'Web request was not handled by actions.';
|
SErrRequestNotHandled = 'Web request was not handled by actions.';
|
||||||
|
SErrNoContentProduced = 'The content producer "%s" didn''t produce any content.';
|
||||||
|
|
||||||
{ THTMLContentProducer }
|
{ THTMLContentProducer }
|
||||||
|
|
||||||
@ -225,6 +226,8 @@ begin
|
|||||||
try
|
try
|
||||||
FWriter.CurrentElement := ParentElement;
|
FWriter.CurrentElement := ParentElement;
|
||||||
el := WriteContent (FWriter);
|
el := WriteContent (FWriter);
|
||||||
|
if not assigned(el) then
|
||||||
|
Raise EHTMLError.CreateFmt(SErrNoContentProduced,[Self.Name]);
|
||||||
result := el.asstring;
|
result := el.asstring;
|
||||||
finally
|
finally
|
||||||
if WCreated then
|
if WCreated then
|
||||||
|
Loading…
Reference in New Issue
Block a user