home *** CD-ROM | disk | FTP | other *** search
/ AppleScript - The Beta Release / AppleScript - The Beta Release.iso / Documentation / develop / Better Apple Event Coding / Code Samples / Exceptions.cp < prev    next >
Encoding:
Text File  |  1992-10-16  |  691 b   |  29 lines  |  [TEXT/MPS ]

  1. /*------------------------------------------------------------------------------------------
  2.  
  3.     Program:    CPlusTESample 2.0
  4.     File:        Exceptions.cp
  5.     Uses:       Exceptions.h
  6.  
  7.     by Andrew Shebanow
  8.     of Apple Macintosh Developer Technical Support
  9.  
  10.     Copyright © 1989-1990 Apple Computer, Inc.
  11.     All rights reserved.
  12.  
  13. ------------------------------------------------------------------------------------------*/
  14.  
  15. #include "Exceptions.h"
  16.  
  17. extern "C" {
  18.     long gFailMessage;        // Current failure message
  19.     short gFailError;        // Current failure error
  20. };
  21.  
  22. pascal void StandardHandler(short e, long m, void* Handler_StaticLink)
  23. {
  24.     gFailError = e;
  25.     gFailMessage = m;
  26.     longjmp((jmp_buf) Handler_StaticLink, 1);
  27. }
  28.  
  29.