Link to home
Start Free TrialLog in
Avatar of jackjoker
jackjoker

asked on

Resume Error

Is there a code that can resume running the program regardless of errors? One that can just run over the errors.
Like "On Error Resume Next" in VB.
ASKER CERTIFIED SOLUTION
Avatar of rwilson032697
rwilson032697

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CalvinDay
CalvinDay

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    procedure AppException(Sender: TObject; E: Exception);
  public
    { Public declarations }
  end;

procedure TfMain.FormCreate(Sender: TObject);
begin
  Application.OnException:=AppException;
end;

procedure TfMain.AppException(Sender: TObject; E:Exception);
begin
  // if you want to skip the errors, comment the next line.
  Application.ShowException(E);
end;