My Blog List

Friday, July 29, 2011

Fiber Available Percentage

I also worked on the Fiber Available Percentage Autoupdater today and made a change to it.  Based on a XML configuration setting now, you have the ability to specify a certain threshold when you update FiberOpticCable. If the percentage of available fibers for that FOC is less than that configurable number, then you will see a warning allowing you to not apply the edit. This utilizes MM_E_CancelEdit which is in Miner.Interop.System.

throw new COMException("Error in xxx ", (int)mmErrorCodes.MM_E_CANCELEDIT);

Don't forget when throwing exceptions like this to NOT catch them!!  If you catch a thrown COM exception the the exception won't get propogated to the the AU framework and the edit will not be cancelled.

1 comment:

  1. Thank you, Devon, for confirming this. I was having this issue and wasn't sure of the reason.

    ReplyDelete