DBIsOutdatedException implemented

main
Inga 🏳‍🌈 12 years ago
parent cfbbeda57c
commit 2f3ca29639
  1. 2
      Builder/IISMainHandler/build.txt
  2. 4
      FLocal.IISHandler/MainHandler.cs
  3. 14
      Patcher.Web/DBIsOutdatedException.cs
  4. 1
      Patcher.Web/Patcher.Web.csproj
  5. 6
      Patcher.Web/PatcherInfo.cs

@ -19,9 +19,7 @@ namespace FLocal.IISHandler {
private void doProcessRequest(HttpContext httpcontext) {
if(PatcherInfo.instance.IsNeedsPatching) {
throw new FLocalException("DB is outdated");
}
PatcherInfo.instance.CheckDBUpToDate();
Uri current = httpcontext.Request.Url;
if(!current.Host.EndsWith(Config.instance.BaseHost)) {

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Patcher.Web {
class DBIsOutdatedException : ApplicationException {
public DBIsOutdatedException()
: base("DB is outdated") {
}
}
}

@ -47,6 +47,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CheckParams.cs" />
<Compile Include="DBIsOutdatedException.cs" />
<Compile Include="InteractiveResponseStream.cs" />
<Compile Include="MainHandler.cs" />
<Compile Include="IPatcherConfiguration.cs" />

@ -23,6 +23,12 @@ namespace Patcher.Web {
}
}
public void CheckDBUpToDate() {
if(this.IsNeedsPatching) {
throw new DBIsOutdatedException();
}
}
internal void PatchesInstalled() {
this.AreNewPatchesInstalled = true;
}

Loading…
Cancel
Save