keweibing / cocos2d-android

Automatically exported from code.google.com/p/cocos2d-android
Other
0 stars 0 forks source link

Exceptions in MenuItem.activate #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
MenuItem.activate has the following code 
                try {
                    invocation.invoke(targetCallback);
                } catch (Exception e) {
                    // Do nothing
                }
This is a problem for me. I want to catch this exception to get exception
details. Could you please remove this try catch block and make exceptions
available for the caller.

What steps will reproduce the problem?
1. throw any exception from menu item handler callback 
2. Exception is silently caught

What is the expected output? What do you see instead?
Exception is thrown out, so calling code can catch this exception.

What version of the product are you using? On what operating system?
cocos2d-android.v0.82 on Windows XP.

Please provide any additional information below.

Original issue reported on code.google.com by alexande...@gmail.com on 4 Mar 2010 at 8:34

GoogleCodeExporter commented 8 years ago
Sorry, looks like it is not possible. I've found another solution. I'll catch
exception inside callback. 
You may mark this issue as invalid.

Original comment by alexande...@gmail.com on 4 Mar 2010 at 9:14

GoogleCodeExporter commented 8 years ago
Okay. Thanks!

Original comment by Laurent....@gmail.com on 22 Jun 2010 at 4:23