SqlDataSourceStatusEventArgs.ExceptionHandled Propriedade

Definição

Obtém ou define um valor que indica se uma exceção gerada pelo banco de dados foi tratada.Gets or sets a value indicating whether an exception thrown by the database has been handled.

public:
 property bool ExceptionHandled { bool get(); void set(bool value); };
public bool ExceptionHandled { get; set; }
member this.ExceptionHandled : bool with get, set
Public Property ExceptionHandled As Boolean

Valor da propriedade

Boolean

true se uma exceção gerada pelo banco de dados foi manipulada e não deve ser gerada pelo SqlDataSource controle; caso contrário, false .true if an exception thrown by the database has been handled and should not be thrown by the SqlDataSource control; otherwise, false.

Comentários

Se o banco de dados lançar uma exceção, a ExceptionHandled propriedade será definida como false e a exceção será encapsulada pela Exception propriedade.If the database throws an exception, the ExceptionHandled property is set to false and the exception is wrapped by the Exception property. Se você usar um SqlDataSourceStatusEventHandler , poderá verificar a Exception propriedade e manipular a exceção.If you use an SqlDataSourceStatusEventHandler, you can check the Exception property and handle the exception. Se você tratar a exceção, defina a ExceptionHandled propriedade como true ou o SqlDataSource controle gerará uma exceção.If you handle the exception, set the ExceptionHandled property to true or the SqlDataSource control will throw an exception.

Aplica-se a

Confira também