The IASPError::get_FileName method returns a BSTR indicating the name of the .asp file that was running when the error occurred.
HRESULT get_FileName(
BSTR *pbstrFileName // pointer to a BSTR describing the .asp file generating the error
);