Delphi custom exception handling and exception general procedure

   Abnormal delphi defined as follows:

TCustomException   =   class(Exception)
    private
    public
        constructor   Create(const   Msg:   string );
    end;

In general programming, because it involves nested function calls this function if an exception occurs in a function, and there is try except statement, if you want a higher level function exception is caught, then call the raise statement except end ie can.

Abnormal general processing configuration programming language is generally

try

try

except

end;

finally

end;

That is a first except statement, handle exceptions, and then is finally statement to freed resource statement in the application.
---------------------
Disclaimer: This article is CSDN bloggers "a Jianping rivers and lakes" original article, follow the CC 4.0 by-sa copyright agreement, reproduced attach the original source link and this statement.
Original link: https: //blog.csdn.net/diligentcatrich/article/details/6989970

Guess you like

Origin www.cnblogs.com/jijm123/p/11351018.html