You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Allow users to catch errors for android platforms and prevent exception throwing
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user