-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2515 from cwensley/curtis/propertybinding-exceptions
Re-throw property binding exceptions
- Loading branch information
Showing
2 changed files
with
62 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
namespace Eto.Forms; | ||
|
||
/// <summary> | ||
/// Exception when getting/setting values in a <see cref="PropertyBinding{T}" /> | ||
/// </summary> | ||
/// <remarks> | ||
/// This exception is thrown explicitly if there is a problem getting or setting the value on the data item. | ||
/// Since using descriptors can sometimes bury the actual stack trace, this can be useful to figure out what property | ||
/// setter/getter is throwing. | ||
/// </remarks> | ||
[System.Serializable] | ||
public class PropertyBindingException : System.Exception | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the PropertyBindingException class. | ||
/// </summary> | ||
public PropertyBindingException() { } | ||
/// <summary> | ||
/// Initializes a new instance of the PropertyBindingException class with the specified message. | ||
/// </summary> | ||
/// <param name="message">Message of the exception</param> | ||
public PropertyBindingException(string message) : base(message) { } | ||
/// <summary> | ||
/// Initializes a new instance of the PropertyBindingException class with the specified message and inner exception. | ||
/// </summary> | ||
/// <param name="message">Message of the exception</param> | ||
/// <param name="inner">Original exception</param> | ||
public PropertyBindingException(string message, System.Exception inner) : base(message, inner) { } | ||
/// <summary> | ||
/// Initializes a new instance of the PropertyBindingException class from serialization. | ||
/// </summary> | ||
/// <param name="info">Serialization info</param> | ||
/// <param name="context">Streaming context</param> | ||
protected PropertyBindingException( | ||
System.Runtime.Serialization.SerializationInfo info, | ||
System.Runtime.Serialization.StreamingContext context) : base(info, context) { } | ||
} |