Rename OrchardSystemException to OrchardCoreException

--HG--
branch : dev
rename : src/Orchard/OrchardSystemException.cs => src/Orchard/OrchardCoreException.cs
This commit is contained in:
Renaud Paquay
2010-06-22 10:53:28 -07:00
parent 2fad0edb92
commit 5db91c1689
8 changed files with 13 additions and 13 deletions

View File

@@ -121,7 +121,7 @@ namespace Orchard.Commands {
if (settingsList.Any()) {
var settings = settingsList.SingleOrDefault(s => String.Equals(s.Name, tenant, StringComparison.OrdinalIgnoreCase));
if (settings == null) {
throw new OrchardSystemException(T("Tenant {0} does not exist", tenant));
throw new OrchardCoreException(T("Tenant {0} does not exist", tenant));
}
var env = host.CreateStandaloneEnvironment(settings);

View File

@@ -30,11 +30,11 @@ namespace Orchard.Commands {
var commandMatch = string.Join(" ", parameters.Arguments.ToArray());
var commandList = string.Join(",", GetCommandDescriptors().Select(d => d.Name).ToArray());
if (matches.Any()) {
throw new OrchardSystemException(T("Multiple commands found matching arguments \"{0}\". Commands available: {1}.",
throw new OrchardCoreException(T("Multiple commands found matching arguments \"{0}\". Commands available: {1}.",
commandMatch, commandList));
}
else {
throw new OrchardSystemException(T("No command found matching arguments \"{0}\". Commands available: {1}.",
throw new OrchardCoreException(T("No command found matching arguments \"{0}\". Commands available: {1}.",
commandMatch, commandList));
}
}

View File

@@ -46,7 +46,7 @@ namespace Orchard.Data {
lock (this) {
if (_sessionFactory != null) {
Logger.Error("CreateSchema can not be called after a session factory was created");
throw new OrchardSystemException(T("CreateSchema can not be called after a session factory was created"));
throw new OrchardCoreException(T("CreateSchema can not be called after a session factory was created"));
}
_sessionFactory = BuildSessionFactory(true /*createDatabase*/, false /*updateSchema*/);
@@ -57,7 +57,7 @@ namespace Orchard.Data {
lock (this) {
if (_sessionFactory != null) {
Logger.Error("UpdateSchema can not be called after a session factory was created");
throw new OrchardSystemException(T("UpdateSchema can not be called after a session factory was created"));
throw new OrchardCoreException(T("UpdateSchema can not be called after a session factory was created"));
}
_sessionFactory = BuildSessionFactory(false /*createDatabase*/, true /*updateSchema*/);

View File

@@ -45,7 +45,7 @@ namespace Orchard.Environment.Extensions.Compilers {
}
}
catch(Exception e) {
throw new OrchardSystemException(T("Error compiling module \"{0}\" from file \"{1}\"", moduleName, context.VirtualPath), e);
throw new OrchardCoreException(T("Error compiling module \"{0}\" from file \"{1}\"", moduleName, context.VirtualPath), e);
}
}

View File

@@ -65,7 +65,7 @@ namespace Orchard.FileSystems.AppData {
}
// Everything failed, throw an exception
throw new OrchardSystemException(T("Unable to make room for file \"{0}\" in \"App_Data\" folder: too many conflicts.", destinationFileName));
throw new OrchardCoreException(T("Unable to make room for file \"{0}\" in \"App_Data\" folder: too many conflicts.", destinationFileName));
}
/// <summary>

View File

@@ -428,7 +428,7 @@
<Compile Include="Environment\DefaultOrchardHost.cs" />
<Compile Include="Mvc\OrchardControllerFactory.cs" />
<Compile Include="Environment\IOrchardHost.cs" />
<Compile Include="OrchardSystemException.cs" />
<Compile Include="OrchardCoreException.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Indexing\IIndexDocument.cs" />
<Compile Include="Indexing\IIndexProvider.cs" />

View File

@@ -3,20 +3,20 @@ using System.Runtime.Serialization;
using Orchard.Localization;
namespace Orchard {
public class OrchardSystemException : Exception {
public class OrchardCoreException : Exception {
private readonly LocalizedString _localizedMessage;
public OrchardSystemException(LocalizedString message)
public OrchardCoreException(LocalizedString message)
: base(message.Text) {
_localizedMessage = message;
}
public OrchardSystemException(LocalizedString message, Exception innerException)
public OrchardCoreException(LocalizedString message, Exception innerException)
: base(message.Text, innerException) {
_localizedMessage = message;
}
protected OrchardSystemException(SerializationInfo info, StreamingContext context)
protected OrchardCoreException(SerializationInfo info, StreamingContext context)
: base(info, context) {
}

View File

@@ -4,7 +4,7 @@ using Orchard.ContentManagement;
using Orchard.Localization;
namespace Orchard.Security {
public class OrchardSecurityException : OrchardSystemException {
public class OrchardSecurityException : OrchardCoreException {
public OrchardSecurityException(LocalizedString message) : base(message) { }
public OrchardSecurityException(LocalizedString message, Exception innerException) : base(message, innerException) { }
protected OrchardSecurityException(SerializationInfo info, StreamingContext context) : base(info, context) { }