mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Rename OrchardSystemException to OrchardCoreException
--HG-- branch : dev rename : src/Orchard/OrchardSystemException.cs => src/Orchard/OrchardCoreException.cs
This commit is contained in:
@@ -121,7 +121,7 @@ namespace Orchard.Commands {
|
|||||||
if (settingsList.Any()) {
|
if (settingsList.Any()) {
|
||||||
var settings = settingsList.SingleOrDefault(s => String.Equals(s.Name, tenant, StringComparison.OrdinalIgnoreCase));
|
var settings = settingsList.SingleOrDefault(s => String.Equals(s.Name, tenant, StringComparison.OrdinalIgnoreCase));
|
||||||
if (settings == null) {
|
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);
|
var env = host.CreateStandaloneEnvironment(settings);
|
||||||
|
@@ -30,11 +30,11 @@ namespace Orchard.Commands {
|
|||||||
var commandMatch = string.Join(" ", parameters.Arguments.ToArray());
|
var commandMatch = string.Join(" ", parameters.Arguments.ToArray());
|
||||||
var commandList = string.Join(",", GetCommandDescriptors().Select(d => d.Name).ToArray());
|
var commandList = string.Join(",", GetCommandDescriptors().Select(d => d.Name).ToArray());
|
||||||
if (matches.Any()) {
|
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));
|
commandMatch, commandList));
|
||||||
}
|
}
|
||||||
else {
|
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));
|
commandMatch, commandList));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ namespace Orchard.Data {
|
|||||||
lock (this) {
|
lock (this) {
|
||||||
if (_sessionFactory != null) {
|
if (_sessionFactory != null) {
|
||||||
Logger.Error("CreateSchema can not be called after a session factory was created");
|
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*/);
|
_sessionFactory = BuildSessionFactory(true /*createDatabase*/, false /*updateSchema*/);
|
||||||
@@ -57,7 +57,7 @@ namespace Orchard.Data {
|
|||||||
lock (this) {
|
lock (this) {
|
||||||
if (_sessionFactory != null) {
|
if (_sessionFactory != null) {
|
||||||
Logger.Error("UpdateSchema can not be called after a session factory was created");
|
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*/);
|
_sessionFactory = BuildSessionFactory(false /*createDatabase*/, true /*updateSchema*/);
|
||||||
|
@@ -45,7 +45,7 @@ namespace Orchard.Environment.Extensions.Compilers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ namespace Orchard.FileSystems.AppData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Everything failed, throw an exception
|
// 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>
|
/// <summary>
|
||||||
|
@@ -428,7 +428,7 @@
|
|||||||
<Compile Include="Environment\DefaultOrchardHost.cs" />
|
<Compile Include="Environment\DefaultOrchardHost.cs" />
|
||||||
<Compile Include="Mvc\OrchardControllerFactory.cs" />
|
<Compile Include="Mvc\OrchardControllerFactory.cs" />
|
||||||
<Compile Include="Environment\IOrchardHost.cs" />
|
<Compile Include="Environment\IOrchardHost.cs" />
|
||||||
<Compile Include="OrchardSystemException.cs" />
|
<Compile Include="OrchardCoreException.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Indexing\IIndexDocument.cs" />
|
<Compile Include="Indexing\IIndexDocument.cs" />
|
||||||
<Compile Include="Indexing\IIndexProvider.cs" />
|
<Compile Include="Indexing\IIndexProvider.cs" />
|
||||||
|
@@ -3,20 +3,20 @@ using System.Runtime.Serialization;
|
|||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
|
|
||||||
namespace Orchard {
|
namespace Orchard {
|
||||||
public class OrchardSystemException : Exception {
|
public class OrchardCoreException : Exception {
|
||||||
private readonly LocalizedString _localizedMessage;
|
private readonly LocalizedString _localizedMessage;
|
||||||
|
|
||||||
public OrchardSystemException(LocalizedString message)
|
public OrchardCoreException(LocalizedString message)
|
||||||
: base(message.Text) {
|
: base(message.Text) {
|
||||||
_localizedMessage = message;
|
_localizedMessage = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OrchardSystemException(LocalizedString message, Exception innerException)
|
public OrchardCoreException(LocalizedString message, Exception innerException)
|
||||||
: base(message.Text, innerException) {
|
: base(message.Text, innerException) {
|
||||||
_localizedMessage = message;
|
_localizedMessage = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected OrchardSystemException(SerializationInfo info, StreamingContext context)
|
protected OrchardCoreException(SerializationInfo info, StreamingContext context)
|
||||||
: base(info, context) {
|
: base(info, context) {
|
||||||
}
|
}
|
||||||
|
|
@@ -4,7 +4,7 @@ using Orchard.ContentManagement;
|
|||||||
using Orchard.Localization;
|
using Orchard.Localization;
|
||||||
|
|
||||||
namespace Orchard.Security {
|
namespace Orchard.Security {
|
||||||
public class OrchardSecurityException : OrchardSystemException {
|
public class OrchardSecurityException : OrchardCoreException {
|
||||||
public OrchardSecurityException(LocalizedString message) : base(message) { }
|
public OrchardSecurityException(LocalizedString message) : base(message) { }
|
||||||
public OrchardSecurityException(LocalizedString message, Exception innerException) : base(message, innerException) { }
|
public OrchardSecurityException(LocalizedString message, Exception innerException) : base(message, innerException) { }
|
||||||
protected OrchardSecurityException(SerializationInfo info, StreamingContext context) : base(info, context) { }
|
protected OrchardSecurityException(SerializationInfo info, StreamingContext context) : base(info, context) { }
|
||||||
|
Reference in New Issue
Block a user