This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added UnauthorizedException, MessageNotFoundException and SessionCann…
…otBeLockedException (#444) Introduction of `MessageNotFoundException` and `SessionCannotBeLockedException` brings more parity of this client with the older .net client. `UnauthorizedException` is being introduced to replace `System.UnauthorizedAccessException` so that all the exceptions are derived from `ServiceBusException`. This is a breaking change.
- Loading branch information
Showing
9 changed files
with
224 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/Microsoft.Azure.ServiceBus/MessageNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.Azure.ServiceBus | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// The exception that is thrown when the requested message is not found. | ||
/// </summary> | ||
public sealed class MessageNotFoundException : ServiceBusException | ||
{ | ||
public MessageNotFoundException(string message) | ||
: this(message, null) | ||
{ | ||
} | ||
|
||
public MessageNotFoundException(string message, Exception innerException) | ||
: base(false, message, innerException) | ||
{ | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Microsoft.Azure.ServiceBus/SessionCannotBeLockedException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.Azure.ServiceBus | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// The exception that is thrown when a session cannot be locked. | ||
/// </summary> | ||
public sealed class SessionCannotBeLockedException : ServiceBusException | ||
{ | ||
public SessionCannotBeLockedException(string message) | ||
: this(message, null) | ||
{ | ||
} | ||
|
||
public SessionCannotBeLockedException(string message, Exception innerException) | ||
: base(false, message, innerException) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
namespace Microsoft.Azure.ServiceBus | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// The exception that is thrown when user doesn't have access to the entity. | ||
/// </summary> | ||
public sealed class UnauthorizedException : ServiceBusException | ||
{ | ||
public UnauthorizedException(string message) | ||
: this(message, null) | ||
{ | ||
} | ||
|
||
public UnauthorizedException(string message, Exception innerException) | ||
: base(false, message, innerException) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.