mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 15:39:58 +08:00
b8fe3c1e06
2002-02-06 Adam Megacz <adam@xwt.org> * configure.in: Changed mingw) to *mingw*). * win32.cc: Created this file. * win32.h: Created this file. * win32.cc, prims.cc, win32.h (win32_exception_handler): Moved win32_exception_handler from prims.cc to win32.cc, added header in win32.h. * prims.cc: removed some #ifdef-WIN32'd headers which are no longer needed now that we have platform.h From-SVN: r49566
24 lines
671 B
C++
24 lines
671 B
C++
// win32.cc - Helper functions for Microsoft-flavored OSs.
|
|
|
|
/* Copyright (C) 2002 Free Software Foundation
|
|
|
|
This file is part of libgcj.
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
details. */
|
|
|
|
#include <config.h>
|
|
#include <windows.h>
|
|
|
|
LONG CALLBACK
|
|
win32_exception_handler (LPEXCEPTION_POINTERS e)
|
|
{
|
|
if (e->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION)
|
|
_Jv_ThrowNullPointerException();
|
|
else if (e->ExceptionRecord->ExceptionCode == EXCEPTION_INT_DIVIDE_BY_ZERO)
|
|
throw new java::lang::ArithmeticException;
|
|
else
|
|
return EXCEPTION_CONTINUE_SEARCH;
|
|
}
|