Handle exceptions on android lazarus / 43-Android ---------------------------------------------------------------------- Rang · 2018-12-18 08:48 How can i handle exceptions on android with using self procedure? On windows working this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ExceptProc := @MyExceptHandler;SetErrorMode(SEM_NOGPFAULTERRORBOX);  SetErrorMode is windows only procedure. Is there solution for android\linux? I need hadle all exceptions in application (native library in android). ---------------------------------------------------------------------- Thaddy · 2018-12-18 10:05 Simply include sysutils and handle with try/except/on ExxxException. The only exception on Android that would try to show a possible exception dialog is EOutOfMemory. That's different from Windows, so AFAIK you don't need to suppress the GP dialog on Android. The above dialog can be suppressed by handling it yourself and drop it. After all it is fatal. ---------------------------------------------------------------------- Rang · 2018-12-18 10:50 Quote from: Thaddy on December 18, 2018, 11:05:29 amSimply include sysutils and handle with try/except/on ExxxException. The only exception on Android that would try to show a possible exception dialog is EOutOfMemory. That's different from Windows, so AFAIK you don't need to suppress the GP dialog on Android. The above dialog can be suppressed by handling it yourself and drop it. After all it is fatal. I need global handler for exceptions, on it i sending report to server with error description, and show simple info for user. I tryed this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ExceptProc := @MyExceptHandler;But on android thats not work. MyExceptHandler not called. On windows, as shown above, all work fine, but there one more line with: SetErrorMode(SEM_NOGPFAULTERRORBOX); ---------------------------------------------------------------------- cpalx · 2018-12-18 21:08 I think, is in Delphi mode, try Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ExceptProc := MyExceptHandler; ---------------------------------------------------------------------- Rang · 2018-12-18 21:46 Quote from: cpalx on December 18, 2018, 10:08:10 pmI think, is Delphi mode, try Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ExceptProc := MyExceptHandler; Does not help. Tried this variant. And yes, Delphi mode by default for all project (-MDelphi).