home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / debug / excdisp / excdisp.cpp next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  810 b   |  29 lines

  1. //************************************************************
  2. // Problem Determination - Simple Catch Dialog
  3. //
  4. // Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  5. // Copyright (c) 1997 John Wiley & Sons, Inc. 
  6. // All Rights Reserved.
  7. //************************************************************
  8. #include <iframe.hpp>
  9. #include <istattxt.hpp>
  10. #include <istring.hpp>
  11. #include <iexcbase.hpp>
  12. #include <imsgbox.hpp>
  13.  
  14. void main( )
  15. {
  16. try {
  17.     IFrameWindow frame(100);
  18.     IStaticText txt(101, 0, 0); // Cause an assertion exception
  19.     frame.setFocus().show();
  20.     IApplication::current().run();
  21.   }
  22.   catch(IException& exc) {
  23.     IMessageBox abortIt(IWindow::desktopWindow());
  24.     abortIt.setTitle("Exception Caught");
  25.     abortIt.show(exc.text(), IMessageBox::okButton);
  26.   }
  27. }
  28.  
  29.