02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PetrelLogger Class<br />

Using the warning message API only requires the previous example to change ErrorBox<br />

to WarnBox.<br />

using Slb.<strong>Ocean</strong>.Petrel;<br />

...<br />

catch (DivideByZeroException e)<br />

{<br />

// Display only the message<br />

PetrelLogger.WarnBox(“Warning-You are trying to divide by zero”);<br />

// Display message and exception<br />

PetrelLogger.WarnBox(“Warning-You are trying to divide by zero”, e);<br />

}<br />

The resulting warning popup dialogs would appear as shown below.<br />

Fig. 5-4 Warning Popup Dialog Messages<br />

<strong>Schlumberger</strong> Private<br />

Petrel Convenience Classes 5-243

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!