Skip to content

Commit 96021ab

Browse files
committed
Add output of init.html to initout argument
1 parent 60f7a34 commit 96021ab

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/ServiceStack/TemplatePagesFeature.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,15 @@ public void Register(IAppHost appHost)
109109
if (initPage != null)
110110
{
111111
appHost.AfterInitCallbacks.Add(host => {
112-
var execInit = new PageResult(initPage).Result;
112+
try
113+
{
114+
var execInit = new PageResult(initPage).Result;
115+
Args["initout"] = execInit;
116+
}
117+
catch (Exception ex)
118+
{
119+
Args["initout"] = ex.ToString();
120+
}
113121
});
114122
}
115123

0 commit comments

Comments
 (0)