From 4a452f86b7f22e72d5eb08b1ce251e3f33a8a06b Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Thu, 11 Feb 2021 11:29:01 +0000 Subject: [PATCH] docs --- apps/gpssetup/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/gpssetup/README.md b/apps/gpssetup/README.md index 4d3922f50..8e64c6a30 100644 --- a/apps/gpssetup/README.md +++ b/apps/gpssetup/README.md @@ -84,7 +84,20 @@ has been configured: require("gpssetup").setPowerMode().then(function() { Bangle.setGPSPower(0); }); -``` +``` + +**Note:** It's not guaranteed that the user will have installed the `gpssetup` +app/module. It might be worth checking for its existence by surrounding the +`require` call with `try...catch` block. + +``` +var gpssetup; +try { + gpssetup = require("gpssetup") +} catch(e) { + E.showMessage("gpssetup\nnot installed"); +} +``` ## References