How can i see exception from rpc calls?

0 votes
If there is an exception in my rpc call (for example a jdbc driver is not found) i get a message on the client that the rpc call failed but there is no log on the server to determine what was the problem.

i had to put a try/catch for the rpc method and print out the exception to find out what was the problem. Is a way to configure appwarps2 so that the exceptions during rpc calls are logged in warplog?
asked Sep 11, 2015 in AppWarpS2 by amarkovits (25 points)

1 Answer

0 votes
 
Best answer

Hi Amarko,

In RPC API, if you want to handle exception on Server side then you can create your general custom Exception message and can send it to client in response.

On Client side you can validate the same message for example message like :

  • In Success :{"success":true,"message":"RPC Response"}
  • In Exception : {"success":false,"exception":"Exception message"}

Let me know if it helps.

 

Thanks & Regards

Vishnu Garg

 

 

answered Sep 12, 2015 by Vishnu Garg (674 points)
selected Sep 18, 2015 by amarkovits
this does not help. My problem is this: I made a rpc method and in that method I made some database operations. Unfortunately I forgot to add the jdbc drivers and the method failed but there was no logs on server side, no stacktrace no nothing. I couldn't figure out what was the problem until I put a try/catch to the whole procedure and logged the exception. I would like that when a method fails with an uncaught exception, that exception to be logged on the server.
Currently we are not saving logs regarding such kind of exception in case of RPC call, we just send a Bad Request response to client in that case.
As you know AppWarpS2 is all about customization you can make a logs as per your requirement on your server side.

We will also looking to it and will try to maintain logs as well on server side.
thank you.

for the moment i will put a try/catch for my rpc methods and log the exception (hopefully none) myself. But I think it would be great if this unexpected exception would be logged automatically. It would make debugging the problems much easier.
Yes Sure, Thanks for valuable feedback.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...