Obsoleted exceptions that shouldn't be used anymore or be refactored
This commit is contained in:
@@ -242,6 +242,7 @@ namespace Umbraco.Core.Collections
|
||||
/// <seealso cref="System.Collections.ObjectModel.ObservableCollection{TValue}" />
|
||||
/// <seealso cref="System.Collections.Generic.IReadOnlyDictionary{TKey, TValue}" />
|
||||
/// <seealso cref="System.Collections.Generic.IDictionary{TKey, TValue}" />
|
||||
[Obsolete("Throw an ArgumentException when trying to add a duplicate key instead.")]
|
||||
[Serializable]
|
||||
internal class DuplicateKeyException : Exception
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Umbraco.Core.Exceptions
|
||||
/// The exception that is thrown when a null reference, or an empty argument, is passed to a method that does not accept it as a valid argument.
|
||||
/// </summary>
|
||||
/// <seealso cref="System.ArgumentNullException" />
|
||||
[Obsolete("Throw an ArgumentNullException when the parameter is null or an ArgumentException when its empty instead.")]
|
||||
[Serializable]
|
||||
public class ArgumentNullOrEmptyException : ArgumentNullException
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ namespace Umbraco.Core.Exceptions
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <seealso cref="System.Exception" />
|
||||
[Obsolete("Refactor the generic type to a concrete serializable type.")]
|
||||
[Serializable]
|
||||
internal class DataOperationException<T> : Exception
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace Umbraco.Core.Exceptions
|
||||
/// </remarks>
|
||||
/// <seealso cref="System.NotImplementedException" />
|
||||
[Serializable]
|
||||
[Obsolete("If a method or operation is not, and will not be, implemented, it is invalid, so we should throw an InvalidOperationException instead.")]
|
||||
public class WontImplementException : NotImplementedException
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Umbraco.Core.IO
|
||||
/// The exception that is thrown when the caller does not have the required permission to access a file.
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Exception" />
|
||||
[Obsolete("Throw an UnauthorizedAccessException instead.")]
|
||||
[Serializable]
|
||||
public class FileSecurityException : Exception
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace Umbraco.Core.Persistence
|
||||
/// An exception used to indicate that an Umbraco entity could not be found.
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Exception" />
|
||||
[Obsolete("Instead of throwing an exception, return null or an HTTP 404 status code instead.")]
|
||||
[Serializable]
|
||||
public class EntityNotFoundException : Exception
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Umbraco.Web.Install
|
||||
/// Used for steps to be able to return a JSON structure back to the UI.
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Exception" />
|
||||
[Obsolete("Refactor the view model into a concrete serializable type.")]
|
||||
[Serializable]
|
||||
internal class InstallException : Exception
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user