/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_UTILITIES_VMERROR_HPP
#define SHARE_VM_UTILITIES_VMERROR_HPP
#include "utilities/globalDefinitions.hpp"
class Decoder;
class VM_ReportJavaOutOfMemory;
friend class VM_ReportJavaOutOfMemory;
friend class Decoder;
enum ErrorType {
};
// Windows exceptions: 0xCxxxxxxx system errors
// 0x8xxxxxxx system warnings
const char * _message;
const char * _detail_msg;
// additional info for crashes
// additional info for VM internal errors
const char * _filename;
int _lineno;
// used by fatal error handler
int _current_step;
const char * _current_step_info;
int _verbose;
// First error, and its thread id. We must be able to handle native thread,
// so use thread id instead of Thread* to identify thread.
static bool coredump_status;
// if coredump_status if false, this will (hopefully) contain a useful error explaining why
// used by reporting about OOM
// on Windows, to handle recursive crashes.
void reset_signal_handlers();
// handle -XX:+ShowMessageBoxOnError. buf is used to format the message string
// generate an error report
// generate a stack trace
// accessor
public:
// Constructor for crashes
void* context);
// Constructor for VM internal errors
const char* message, const char * detail_msg);
// Constructor for VM OOM errors
const char* message);
// Constructor for non-fatal errors
// return a string to describe the error
// main error reporting function
void report_and_die();
// reporting OutOfMemoryError
void report_java_out_of_memory();
// returns original flags for signal, if it was resetted, or -1 if
// signal was not changed by error reporter
static int get_resetted_sigflags(int sig);
// returns original handler for signal, if it was resetted, or NULL if
// signal was not changed by error reporter
// check to see if fatal error reporting is in progress
};
#endif // SHARE_VM_UTILITIES_VMERROR_HPP