Skip to content

feat: improve RMI error reporting#14

Merged
paodb merged 2 commits into
mainfrom
rmi-exceptions
Jun 28, 2023
Merged

feat: improve RMI error reporting#14
paodb merged 2 commits into
mainfrom
rmi-exceptions

Conversation

@javier-godoy

Copy link
Copy Markdown
Member

Improve RMI error reporting by returning a RMI_RESPONSE_ERROR property that communicates back to the test-side what went wrong in the server-side (along with the remote exception trace, so that one doesn't have to "check the server logs", and all the failure is captured in JUnit output). There are different error codes that distinguish internal RMI errors (serialization, reflection, etc) from actual exceptions thrown by the invoked methods.

  • E_PROTOCOL_ERROR: indicates that the request was incorrectly formatted.
  • E_CLASS_NOT_FOUND: indicates that the requested target class could not be located.
  • E_NO_SUCH_METHOD: indicates that the target class does not implement the requested method.
  • E_OBJECT_NOT_EXIST: indicates an attempt to pass an unregistered value as an object reference.
  • E_INVOKE: represents an exception that occurred when executing a remote method. The response data includes the serialized form of the thrown exception.
  • E_MARSHAL: indicates an error that occurred when serializing the response. The response data includes the serialized form of the thrown exception.
  • E_UNMARSHAL: indicates an error that occurred when deserializing the request arguments. The response data includes the serialized form of the thrown exception.
  • E_UNKNOWN: represents an unlisted exception. The response data includes the serialized form of the thrown exception.

@javier-godoy javier-godoy requested a review from paodb June 28, 2023 01:17
@paodb paodb merged commit 3a5bef5 into main Jun 28, 2023
@paodb paodb deleted the rmi-exceptions branch June 28, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants