Flashcards
Exceptions
Flashcards do conjunto (10)
- 1What is an Exception?It's an unexpected error generated by the system.
- 2What is the Exception namespace?System.Exception
- 3How to create a custom exception?1. You need to create a new class Exception suffixed.
2. Inherit the Exception class
3. Implement the three constructors:
-public CustomException()
-public CustomException(string message): base(message)
-public CustomException(string message, Exception inner) : base(message, inner) - 4What are the database exceptions?DbException
OracleException
SqlException
MySqlException - 5What is a DataException?It's an excption generated by the ADO.NET
- 6What is a Rethrow class?It's a class implementation that re-throws a a previously thrown exception.
- 7What are the Rethrow class properties and respective description?Id - unique identifier
CacheId - unique identifier on the workflow definition
DisplayName - friendly name
ImplementationVersion - 8What are the sql exception error classification?SqlError.Number
1-10 : informational
11-16: can be corrected by the user
17-25: software errors - 9Can custom exceptions implement IDisposable?Cannot
- 10What happens when you simply call "throw"?The exception's call stack is reset to start at the current line of code.
Informações
- Descrição
- FlashCards sobre Exceptions, criado por Thiago Avelino em 16-01-2016.
- Criado por
- Thiago Avelino
- Visualizações
- 0
- Avaliação