1

i am done coding my App and i will be publishing soon. Right now, when there is an error in the app, it stops the whole app and shows StackTrace errors. please how can i stop this. i saw a solution relating to this on the nativescript website

this is what i have tried below

import * as traceModule from "tns-core-modules/trace";
const errorHandler = {
    handlerError(err) {

    }
};
traceModule.setErrorHandler(errorHandler);

NB: i use nativescript core (javascript)

kunlee
  • 591
  • 1
  • 4
  • 15
  • You may read the disable uncaught exception section in same document to handle the exception differently. – Manoj May 02 '20 at 21:32

1 Answers1

1

saw this solution on stackoverflow

When an android application is built in release mode;

tns build android --release --key-store-path [path] --key-store-password [pw] --key-store-alias [alias] --key-store-alias-pw [pw]

The app will automatically disable the stack trace screen on Android. By default the tns build android will be building debug mode applications.

kunlee
  • 591
  • 1
  • 4
  • 15
  • 1
    Yes, I can confirm that. Google Play requires debugging mode disabled anyways, just build a release. FYI: If you have errors that crashes the app, you should fix those instead just release an app with these kind of issues – Peter May 03 '20 at 16:24