|
|
@ -56,6 +56,10 @@ namespace FLocal.IISHandler.handlers.request { |
|
|
|
if(this.shouldBeGuest && context.session != null) throw new FLocalException("Should be guest"); |
|
|
|
if(this.shouldBeGuest && context.session != null) throw new FLocalException("Should be guest"); |
|
|
|
if(this.shouldBeLoggedIn && context.session == null) throw new FLocalException("Should be anonymous"); |
|
|
|
if(this.shouldBeLoggedIn && context.session == null) throw new FLocalException("Should be anonymous"); |
|
|
|
context.httpresponse.Write(context.Transform(this.templateName, this.getData(context))); |
|
|
|
context.httpresponse.Write(context.Transform(this.templateName, this.getData(context))); |
|
|
|
|
|
|
|
} catch(RedirectException) { |
|
|
|
|
|
|
|
throw; |
|
|
|
|
|
|
|
} catch(WrongUrlException) { |
|
|
|
|
|
|
|
throw; |
|
|
|
} catch(Exception e) { |
|
|
|
} catch(Exception e) { |
|
|
|
context.LogError(e); |
|
|
|
context.LogError(e); |
|
|
|
context.httpresponse.Write(context.Transform("Exception.xslt", new XDocument(new XElement("root", this.getCommonData(context), e.ToXml())))); |
|
|
|
context.httpresponse.Write(context.Transform("Exception.xslt", new XDocument(new XElement("root", this.getCommonData(context), e.ToXml())))); |
|
|
|