Throwing a .NET exception class

Posted by Lieven Cardoen on 12-Dec-2013 03:47

Is it possible to throw a .NET exception class? For instance:

CONSTRUCTOR PUBLIC RibbonCustomizationDialog(
ultraToolbarsManager AS UltraToolbarsManager,
ribbonCustomizationProvider AS IRibbonCustomizationProvider,
serializationFormat AS SerializationFormat):

THIS-OBJECT().

IF ultraToolbarsManager = ? THEN DO:
       THROW NEW System.ArgumentNullException().  /* THIS GIVES ME AN ERROR */
END.

END CONSTRUCTOR.

Apparently, catching such a .NET exception with a CATCH should be possible... but throwing them?

Posted by Peter Judge on 12-Dec-2013 08:05

What's the error?

It might just a syntax issue (note the UNDO first):

   UNDO, THROW NEW System.ArgumentNullException().

or

   RETURN ERROR NEW System.ArgumentNullException().

Should both work.

-- peter

All Replies

Posted by Peter Judge on 12-Dec-2013 08:05

What's the error?

It might just a syntax issue (note the UNDO first):

   UNDO, THROW NEW System.ArgumentNullException().

or

   RETURN ERROR NEW System.ArgumentNullException().

Should both work.

-- peter

This thread is closed