Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Automation errors


1 reply to this topic

Rastislav Zima

Rastislav Zima
  • Members
  • 34 posts

Posted 10 July 2001 - 14:47

I am using automation in my InstallScript code e.g.:

try
   set oSQLServer = CreateObject ( "SQLDMO.SQLServer" );
   oSQLServer.Start(FALSE, szDtSrvr);
catch
   return ERROR_INSTALL_FAILURE;
endcatch;

When some automation method fails I would like to return some information why it failed - how can I do this?


RobertDickau

RobertDickau
  • Members
  • 29 posts

Posted 14 July 2001 - 16:21

InstallScript has an Err object (similar to the VB Err object) that stores information about the exception; its properties are:

Err.Number
Err.Source
Err.Description
Err.HelpFile
Err.HelpContext
Err.LastDllError

...so perhaps put something like MessageBox(Err.Description, WARNING); in your catch block.