8218628: Add detailed message to NullPointerException describing what is null

This is the implementation of JEP 358: Helpful NullPointerExceptions.

Reviewed-by: coleenp, clanger, rschmelter, rriggs, forax, mr
This commit is contained in:
Goetz Lindenmaier 2019-10-14 11:36:17 +02:00
parent 6147018a0f
commit d8c6516c92
15 changed files with 3643 additions and 7 deletions

View file

@ -518,7 +518,8 @@ class java_lang_Throwable: AllStatic {
trace_mirrors_offset = 2,
trace_names_offset = 3,
trace_next_offset = 4,
trace_size = 5,
trace_hidden_offset = 5,
trace_size = 6,
trace_chunk_size = 32
};
@ -568,6 +569,8 @@ class java_lang_Throwable: AllStatic {
static void java_printStackTrace(Handle throwable, TRAPS);
// Debugging
friend class JavaClasses;
// Gets the method and bci of the top frame (TOS). Returns false if this failed.
static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
};