mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Allow users to catch errors for android platforms and prevent exception throwing
This commit is contained in:
parent
b9d3926340
commit
6fc89d0ce3
4 changed files with 42 additions and 11 deletions
|
|
@ -190,6 +190,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
protected void onGLDrawFrame(GL10 gl) {}
|
||||
protected void onGLSurfaceChanged(GL10 gl, int width, int height) {} // singletons will always miss first onGLSurfaceChanged call
|
||||
|
||||
protected void onError(final String type, final String functionName, final String details, final String filename, final int line) {}
|
||||
public void registerMethods() {}
|
||||
}
|
||||
|
||||
|
|
@ -934,4 +935,11 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
mProgressFraction.setText(Helpers.getDownloadProgressString(progress.mOverallProgress,
|
||||
progress.mOverallTotal));
|
||||
}
|
||||
|
||||
public void emitErrorSignal(final String type, final String functionName, final String details, final String filename, final int line) {
|
||||
// Allow users to use 3rd party modules to catch godot's errors.
|
||||
for (int i = 0; i < singleton_count; i++) {
|
||||
singletons[i].onError(type, functionName, details, filename, line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue