Skip to content

Commit 1ef8e09

Browse files
committed
Use more appropriate base types for exception classes
1 parent fd689c8 commit 1ef8e09

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

src/corelib/Core/Exceptions/CDNNotEnabledException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace net.openstack.Core.Exceptions
1010
/// </summary>
1111
/// <seealso cref="IObjectStorageProvider"/>
1212
[Serializable]
13-
public class CDNNotEnabledException : Exception
13+
public class CDNNotEnabledException : InvalidOperationException
1414
{
1515
/// <summary>
1616
/// Initializes a new instance of the <see cref="CDNNotEnabledException"/> class.

src/corelib/Core/Exceptions/CidrFormatException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace net.openstack.Core.Exceptions
99
/// </summary>
1010
/// <seealso cref="INetworksValidator.ValidateCidr"/>
1111
[Serializable]
12-
public class CidrFormatException : Exception
12+
public class CidrFormatException : FormatException
1313
{
1414
/// <summary>
1515
/// Initializes a new instance of the <see cref="CidrFormatException"/> class.

src/corelib/Core/Exceptions/ContainerNameException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace net.openstack.Core.Exceptions
1010
/// </summary>
1111
/// <seealso cref="IObjectStorageValidator.ValidateContainerName"/>
1212
[Serializable]
13-
public class ContainerNameException : Exception
13+
public class ContainerNameException : ArgumentException
1414
{
1515
/// <summary>
1616
/// Initializes a new instance of the <see cref="ContainerNameException"/> class.

src/corelib/Core/Exceptions/InvalidCloudIdentityException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace net.openstack.Core.Exceptions
99
/// to a provider method is not supported by that provider.
1010
/// </summary>
1111
[Serializable]
12-
internal class InvalidCloudIdentityException : Exception
12+
internal class InvalidCloudIdentityException : NotSupportedException
1313
{
1414
/// <summary>
1515
/// Initializes a new instance of the <see cref="InvalidCloudIdentityException"/> class

src/corelib/Core/Exceptions/NoDefaultRegionSetException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace net.openstack.Core.Exceptions
88
/// no region was specified and no default region is available for the provider.
99
/// </summary>
1010
[Serializable]
11-
public class NoDefaultRegionSetException : Exception
11+
public class NoDefaultRegionSetException : InvalidOperationException
1212
{
1313
/// <summary>
1414
/// Initializes a new instance of the <see cref="NoDefaultRegionSetException"/> class

src/corelib/Core/Exceptions/ObjectNameException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace net.openstack.Core.Exceptions
1010
/// </summary>
1111
/// <seealso cref="IObjectStorageValidator.ValidateObjectName"/>
1212
[Serializable]
13-
public class ObjectNameException : Exception
13+
public class ObjectNameException : ArgumentException
1414
{
1515
/// <summary>
1616
/// Initializes a new instance of the <see cref="ObjectNameException"/> class.

src/corelib/Core/Exceptions/TTLLengthException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace net.openstack.Core.Exceptions
88
/// the range supported by the provider.
99
/// </summary>
1010
[Serializable]
11-
public class TTLLengthException : Exception
11+
public class TTLLengthException : ArgumentException
1212
{
1313
/// <summary>
1414
/// Initializes a new instance of the <see cref="TTLLengthException"/> class.

src/corelib/Core/Exceptions/UserAuthorizationException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace net.openstack.Core.Exceptions
1212
/// <see cref="UserAccess.ServiceCatalog"/>.
1313
/// </summary>
1414
[Serializable]
15-
public class UserAuthorizationException : Exception
15+
public class UserAuthorizationException : InvalidOperationException
1616
{
1717
/// <summary>
1818
/// Initializes a new instance of the <see cref="UserAuthorizationException"/> class

0 commit comments

Comments
 (0)