JDK-4900408 : JVMTI spec: need to be able to retrieve name of error
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2003-08-04
  • Updated: 2017-05-16
  • Resolved: 2003-10-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Relates :  
Description
Almost every JVMTI agent or JVMTI test needs a fatal error handler that
prints out a symbolic name of the unexpected error.  This might seem to
be a convenience method except that error code may change with new 
versions of JVMTI, an agent may have been written to an older version 
of the spec and thus not have a new error code.  

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: tiger INTEGRATED IN: tiger tiger-b18
14-06-2004

EVALUATION This a universally needed functionality and the code to implement it already exists in the JVMTI implementation.
11-06-2004

SUGGESTED FIX Get Error Name jvmtiError GetErrorName(jvmtiEnv* env, jvmtiError error, char** name_ptr) Return the symbolic name for an error code. For example GetErrorName(env, JVMTI_ERROR_NONE, &err_name) would return in err_name the string "JVMTI_ERROR_NONE". This function may be called during any phase. Capabilities Required Functionality Parameters Name Type Description error jvmtiError The error code. name_ptr char** On return, points to the error name. Agent passes a pointer to a char*. On return, the char* points to a newly allocated array. The array should be freed with Deallocate. Errors This function returns either a universal error or one of the following errors Error Description JVMTI_ERROR_ILLEGAL_ARGUMENT error is not a jvmtiError. JVMTI_ERROR_NULL_POINTER name_ptr is NULL.
11-06-2004