![]() | Products |
| Home » Technical Support » Elevate Web Builder Technical Support » Product Manuals » Elevate Web Builder 3 Manual » Language Reference » Exception Handling |
Exception = class(TObject)
public
property Message: String read;
property UnitName: String read;
property StackTrace: String read;
end;raise <Exception Class Instance>;
function AddValues(A,B: Integer): Integer;
begin
if (A < 0) then
raise Exception.Create('First parameter '+IntToStr(A)+' cannot be negative');
if (B < 0) then
raise Exception.Create('Second parameter '+IntToStr(A)+' cannot be negative');
Result:=(A+B);
end;try <Statements> except <Exception-handling statements> end;
on <ExceptionInstanceVariable>: <ExceptionClass> do <Statements> on <ExceptionClass> do <Statements>
begin
try
// Statements that raise exception
except
on E: Exception do
LogOutput(E.Message);
end;
end;begin
try
// Statements that raise exception
except
on E: Exception do
LogOutput(E.Message);
raise;
end;
end;try <Statements> finally <Statements> end;
procedure TMyClass.Execute;
begin
FExecuting:=True;
try
// Executing
finally
FExecuting:=False;
end;
end;This web page was last updated on Tuesday, September 16, 2025 at 04:56 PM | Privacy Policy © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? |

