🗊 Презентация Exception Handling in .NET Framework

Нажмите для полного просмотра!
Exception Handling in .NET Framework, слайд №1 Exception Handling in .NET Framework, слайд №2 Exception Handling in .NET Framework, слайд №3 Exception Handling in .NET Framework, слайд №4 Exception Handling in .NET Framework, слайд №5 Exception Handling in .NET Framework, слайд №6 Exception Handling in .NET Framework, слайд №7 Exception Handling in .NET Framework, слайд №8 Exception Handling in .NET Framework, слайд №9 Exception Handling in .NET Framework, слайд №10 Exception Handling in .NET Framework, слайд №11 Exception Handling in .NET Framework, слайд №12 Exception Handling in .NET Framework, слайд №13 Exception Handling in .NET Framework, слайд №14 Exception Handling in .NET Framework, слайд №15 Exception Handling in .NET Framework, слайд №16 Exception Handling in .NET Framework, слайд №17 Exception Handling in .NET Framework, слайд №18 Exception Handling in .NET Framework, слайд №19 Exception Handling in .NET Framework, слайд №20 Exception Handling in .NET Framework, слайд №21 Exception Handling in .NET Framework, слайд №22 Exception Handling in .NET Framework, слайд №23 Exception Handling in .NET Framework, слайд №24 Exception Handling in .NET Framework, слайд №25 Exception Handling in .NET Framework, слайд №26

Вы можете ознакомиться и скачать презентацию на тему Exception Handling in .NET Framework. Доклад-сообщение содержит 26 слайдов. Презентации для любого класса можно скачать бесплатно. Если материал и наш сайт презентаций Mypresentation Вам понравились – поделитесь им с друзьями с помощью социальных кнопок и добавьте в закладки в своем браузере.

Слайды и текст этой презентации


Слайд 1


Structured Exceptions Handling in .NET V'yacheslav Koldovskyy SoftServe University 2014
Описание слайда:
Structured Exceptions Handling in .NET V'yacheslav Koldovskyy SoftServe University 2014

Слайд 2


Contents
Описание слайда:
Contents

Слайд 3


1. Introduction to structured exception handling
Описание слайда:
1. Introduction to structured exception handling

Слайд 4


Main task – correct operation of the application There are possible situations during the application execution when predetermined plan of actions...
Описание слайда:
Main task – correct operation of the application There are possible situations during the application execution when predetermined plan of actions may be changed Developer should provide ways to ensure correct execution despite possible errors

Слайд 5


Obsolete check-based method Obsolete error handling method is based on multiple checks of input data and operation return codes. Drawbacks:...
Описание слайда:
Obsolete check-based method Obsolete error handling method is based on multiple checks of input data and operation return codes. Drawbacks: difficulties; bloated code; unreliable.

Слайд 6


Structured exception handling Modern way to handle errors provides using of special mechanism – structured exception handling which is the part of...
Описание слайда:
Structured exception handling Modern way to handle errors provides using of special mechanism – structured exception handling which is the part of programming language Exception is an event which happens during software execution and changes normal way of code execution Exceptions in .NET Framework are instances of classes inherited from base class Exception. Only instances of this class and inherited classes may participated in structured exception handling.

Слайд 7


2. Construct «try..catch»
Описание слайда:
2. Construct «try..catch»

Слайд 8


Simplest "try..catch" constuct try { // Code which may result in exception } catch { // Code executed only in case of exception }
Описание слайда:
Simplest "try..catch" constuct try { // Code which may result in exception } catch { // Code executed only in case of exception }

Слайд 9


"try..catch" construct with specific exception try { // Code which may result in exception } catch (DivideByZeroException) { // Code...
Описание слайда:
"try..catch" construct with specific exception try { // Code which may result in exception } catch (DivideByZeroException) { // Code executed in case of exception }

Слайд 10


Cascade sections of catch try { // Code which may result in exception catch (DivideByZeroException) { // Code executed in case of exception type...
Описание слайда:
Cascade sections of catch try { // Code which may result in exception catch (DivideByZeroException) { // Code executed in case of exception type DivideByZeroException } catch (Exception) { // Code executed in case of exception type Exception // Means "any exception" }

Слайд 11


"try..catch" construct with instance of exception
Описание слайда:
"try..catch" construct with instance of exception

Слайд 12


3. «Exception» class and exception hierarchy in.NET Framework
Описание слайда:
3. «Exception» class and exception hierarchy in.NET Framework

Слайд 13


Exception class Exception is a base class for all exceptions исключений Important properties: Message – user-oriented message about error Source –...
Описание слайда:
Exception class Exception is a base class for all exceptions исключений Important properties: Message – user-oriented message about error Source – name of an error source (application or object) InnerException – inner exception (if called from other) StackTrace – call stack to the point of exception call TargetSite – method name which raised an exception HelpLink – URL-address to information about exception Data – dictionary with additional information with exception (IDictionary)

Слайд 14


Exception hierarchy in .NET Framework
Описание слайда:
Exception hierarchy in .NET Framework

Слайд 15


4. Exception throwing and re-rising
Описание слайда:
4. Exception throwing and re-rising

Слайд 16


Exception throwing
Описание слайда:
Exception throwing

Слайд 17


Exception re-rising
Описание слайда:
Exception re-rising

Слайд 18


5. Creating own exceptions
Описание слайда:
5. Creating own exceptions

Слайд 19


Exception declaration
Описание слайда:
Exception declaration

Слайд 20


MSDN recommendations for exception declarations
Описание слайда:
MSDN recommendations for exception declarations

Слайд 21


6. Construct «try..finally»
Описание слайда:
6. Construct «try..finally»

Слайд 22


Using finally «try..finally» used when it is required to guarantee execution of some code May be used together with catch
Описание слайда:
Using finally «try..finally» used when it is required to guarantee execution of some code May be used together with catch

Слайд 23


7. Best practices for exception handling
Описание слайда:
7. Best practices for exception handling

Слайд 24


Best practices for exception handling Do not catch general exceptions (do not use catch without parameters or catch(Exception) ) Create own...
Описание слайда:
Best practices for exception handling Do not catch general exceptions (do not use catch without parameters or catch(Exception) ) Create own exceptions based on ApplicationException class but not on SystemException Do not use exceptions for application execution control flow as exception handling is heavy resource usage task. Exceptions should be used to manage errors only Do not mute exceptions which can’t be handled in application context (system errors and failures). Do not raise general exceptions: Exception, SystemException, ApplicationException Do not generate reserved system exceptions: ExecutionEngineException, IndexOutOfRangeException, NullReferenceException, OutOfMemoryException Do not return an exception instance as a method return result instead of using throw. Do not create exceptions used only for debugging purposes. Do define debug-only exceptions use Assert.

Слайд 25


8. References to additional sources MSDN recommendations for creating exceptions: MSDN recommendation for exception generation: Full hierarchy of...
Описание слайда:
8. References to additional sources MSDN recommendations for creating exceptions: MSDN recommendation for exception generation: Full hierarchy of Microsoft .NET Framework exceptions (code sample in comments):

Слайд 26


Contacts
Описание слайда:
Contacts



Похожие презентации
Mypresentation.ru
Загрузить презентацию