unit uError;

interface

uses Rubies;

var
  ErrorFile: string;
  ErrorLine: Integer;
  eDelphiError: Tvalue;
  eDelphiAbort: Tvalue;

function PhiErrorFile: string;
function PhiErrorLine: Integer;
function ap_eDelphiError: Tvalue;
function ap_eDelphiAbort: Tvalue;
procedure Init_error;

implementation

uses uPhi;

function PhiErrorFile: string;
begin
  result := ErrorFile;
end;

function PhiErrorLine: Integer;
begin
  result := ErrorLine;
end;

function ap_eDelphiError: Tvalue;
begin
  result := eDelphiError;
end;
function ap_eDelphiAbort: Tvalue;
begin
  result := eDelphiAbort;
end;

procedure Init_error;
begin
  eDelphiError := rb_define_class_under(mPhi, 'DelphiError', ap_eStandardError);
  eDelphiAbort := rb_define_class_under(mPhi, 'DelphiAbort',    eDelphiError);
end;

end.
