PRB:Scriptor Component Returns "Catastrophic Failure" Error

Last reviewed: November 3, 1997
Article ID: Q174222
The information in this article applies to:
  • Microsoft Commerce Server, version 2.0

SYMPTOMS

When a custom scriptor component written in VBScript is executed, the following error may occur based on whether or not error handling code is in place in the component.

   Commerce.OrderPipeline error '80020009'

   ::OrderExecute() failed for component[0x..] hr: 0x8000ffff PROGID:
   Commerce.Scriptor.1 Cannot Execute Script SetScriptSite Catastrophic
   failure

   <file name>, <line number>

The first time a scripting error is encountered, the pipeline returns the error and a description of the scripting error. For example, if you attempt to divide an integer by zero in your component, you receive the following error message the first time pipeline is run:

   Commerce.OrderPipeline error '80020009'

   ::OrderExecute() failed for component[0x..] hr: 0x80004005 PROGID:
   Commerce.Scriptor.1 Cannot Execute Script Execute invocation failed
   Unspecified error Division by zero

   <file name>, <line number>

After the scriptor component encounters the divide by zero error, subsequent executions of the order processing pipeline fail with the "catastrophic failure" error message.

CAUSE

The problem occurs because no error handling code is written in the custom component.

WORKAROUND

To work around this problem, always specify "On Error Resume Next" in the component's VBScript code.

MORE INFORMATION

The following information about "On Error Resume Next" is included in the online VBScript reference in Visual Studio:

   Syntax
   On Error Resume Next

   Remarks
   If you don't use an On Error Resume Next statement, any run-time error
   that occurs is fatal; that is, an error message is displayed and
   execution stops.

   On Error Resume Next causes execution to continue with the statement
   immediately following the statement that caused the run-time error, or
   with the statement immediately following the most recent call out of the
   procedure containing the On Error Resume Next statement. This allows
   execution to continue despite a run-time error. You can then build the
   error-handling routine inline within the procedure. An On Error Resume
   Next statement becomes inactive when another procedure is called, so you
   should execute an On Error Resume Next statement in each called routine
   if you want inline error handling within that routine.


Additional query words: merchant prodcommerce
Keywords : kbprg CommMisc
Version : Windows:2.0
Platform : WINDOWS
Issue type : kbprb
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.