Permalink
Browse files

Adding better parameter checking

  • Loading branch information...
1 parent 949ffe6 commit e4ba9c48209ee3c41562e8079cf9281eaea3e41a @ayende ayende committed Jan 21, 2012
Showing with 5 additions and 0 deletions.
  1. +2 −0 Raven.Web/ForwardToRavenResponders.cs
  2. +3 −0 Raven.Web/ForwardToRavenRespondersFactory.cs
View
2 Raven.Web/ForwardToRavenResponders.cs
@@ -3,6 +3,8 @@
// Copyright (c) Hibernating Rhinos LTD. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
+
+using System;
using System.Web;
using Raven.Database.Server;
using Raven.Database.Server.Abstractions;
View
3 Raven.Web/ForwardToRavenRespondersFactory.cs
@@ -31,6 +31,9 @@ public IHttpHandler GetHandler(HttpContext context, string requestType, string u
{
if (database == null)
throw new InvalidOperationException("Database has not been initialized properly");
+ if (server == null)
+ throw new InvalidOperationException("Server has not been initialized properly");
+
return new ForwardToRavenResponders(server);
}

0 comments on commit e4ba9c4

Please sign in to comment.