Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More explicit onManaged* Exceptions #212

Open
wants to merge 1 commit into
base: GLES2
Choose a base branch
from

Conversation

flomin
Copy link

@flomin flomin commented Apr 11, 2013

Exceptions can occurred in the onManagedDraw or onManagedUpdate methods of Entity and onUpdateSpriteBatch method of SpriteBatch:

  • IndexOutOfBound if a detach was done on the UI Thread;
  • NPE if an attach is done with a null value...

These exceptions can be pretty tough to track and correct.

This patch display more informations about the exact entity which can problem by adding try/catch blocks to these methods and wrapping the exception with context information.

It also does a NPE check in the Entity.toString(StringBuilder) method, as well as using getName instead of getSimpleName to have useful informations when using proguard.

Exceptions can occurred in the onManagedDraw or onManagedUpdate methods of Entity and onUpdateSpriteBatch method of SpriteBatch:
 - IndexOutOfBound if a detach was done on the UI Thread;
 - NPE if an attach is done with a null value...

These exceptions can be pretty tough to track and correct. This patch display more informations about the exact entity which can problem.
It also does a NPE check in the Entity.toString(StringBuilder) method, as well as using getName instead of getSimpleName to have useful informations when using proguard.
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.

None yet

1 participant