Community
Participate
Working Groups
Build Identifier: Vesion 3.7.0 I made an extensible plugin "Calculator". I put the extention points and then put extentions to it. But when I put extention for Divison, even though I did not handled Divide by Zero exception, its not throwing any exception. e.g. It is showing 6/0 as 6. Here both numerator and denominator are int. Reproducible: Always Steps to Reproduce: 1. Don't handle the divide by zero exception. 2. Run as Eclipse Application 3. Put two numbers as 6 and zero 4. output is 6 i.e. 6/0=6
Append -consoleLog as an argument to your program's launch configuration.
Created attachment 200246 [details] It has three scenn shots. One is the output . One is for extention class and the last one is for extention point
(In reply to comment #1) > Append -consoleLog as an argument to your program's launch configuration. Hi, I have attached a zip folder, which has appropriate screen shots. Kindly see. Thanks.
(In reply to comment #2) > Created attachment 200246 [details] > It has three scenn shots. One is the output . One is for extention class and > the last one is for extention point These screenshots tell us nothing new. Please see comment 1.
It sounds like you have a problem in the implementation of your extensible calculator plug-in. There is no bug in PDE here. Closing as INVALID.
(In reply to comment #5) > It sounds like you have a problem in the implementation of your extensible > calculator plug-in. There is no bug in PDE here. Closing as INVALID. (In reply to comment #5) > It sounds like you have a problem in the implementation of your extensible > calculator plug-in. There is no bug in PDE here. Closing as INVALID. I have Attached the console log. It says that there is a Arithmetic exception of Divide by zero. But then why it is not throwing any exception at run time?
Created attachment 200326 [details] Console log for divide by zero exception
(In reply to comment #6) > I have Attached the console log. It says that there is a Arithmetic exception > of Divide by zero. But then why it is not throwing any exception at run time? The exception was thrown and it got logged in your other Eclipse's workspace log. I don't see a problem here.
(In reply to comment #6) > I have Attached the console log. It says that there is a Arithmetic exception > of Divide by zero. But then why it is not throwing any exception at run time? The exception isn't coming from the Eclipse runtime, it is coming from your calculator plug-in. We do not have special handling for uncaught exceptions in client code. The log makes it clear that the Calculator code is not handling divide by zero and it must be fixed there.
(In reply to comment #9) > (In reply to comment #6) > > I have Attached the console log. It says that there is a Arithmetic exception > > of Divide by zero. But then why it is not throwing any exception at run time? > > The exception isn't coming from the Eclipse runtime, it is coming from your > calculator plug-in. We do not have special handling for uncaught exceptions in > client code. The log makes it clear that the Calculator code is not handling > divide by zero and it must be fixed there. Yes that is my point. My Calculator plug-in is not handling the exception and it throws the exception at console log only. If I dispatch such a code to the client or use it for myself as a jar file, then nobody will come to know what exactly would be going throw.You may say it as mine programmatic error and I should not be doing this. But if it happens then what to do?. I think in such a case it should throw the exception at run time too and stop further execution unless caught properly.Thank you.
(In reply to comment #10) > If I dispatch such a code to the > client or use it for myself as a jar file, then nobody will come to know what > exactly would be going throw.You may say it as mine programmatic error and I > should not be doing this. But if it happens then what to do? That's for you to decide. You can choose to catch such exceptions and propagate it to the user through a dialog or you can choose to let it silently fail. The Eclipse platform cannot make this decision for your plug-in. > I think in such a > case it should throw the exception at run time too and stop further execution > unless caught properly. I don't understand your suggestion here. The exception is being thrown already. What do you mean by stop further execution?