Skip to content

Commit da61e06

Browse files
committed
style: standardized error logging messages
1 parent 9f440ac commit da61e06

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

hooks/lib/android/androidManifest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
} else if (preferences.linkDomain.indexOf('bnc.lt') !== -1) {
188188
// bnc.lt
189189
if (preferences.androidPrefix == null) {
190-
throw new Error('BRANCH SDK: Missing "android-prefix" in <branch-config> in your config.xml. https://goo.gl/GijGKP')
190+
throw new Error('BRANCH SDK: Missing "android-prefix" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP')
191191
}
192192

193193
intentFilterData.push(getAppLinkIntentFilterDictionary(preferences.linkDomain, preferences.androidPrefix))

hooks/lib/ios/developmentTeam.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
// pretty-json
3535
return JSON.stringify(content, null, 2)
3636
} catch (err) {
37-
throw new Error('BRANCH SDK: Cannot write build.json within your root directory. https://goo.gl/GijGKP')
37+
throw new Error('BRANCH SDK: Cannot write build.json within your root directory. Docs https://goo.gl/GijGKP')
3838
}
3939
}
4040

@@ -44,7 +44,7 @@
4444
try {
4545
return JSON.parse(content)
4646
} catch (err) {
47-
throw new Error('BRANCH SDK: Cannot read build.json within your root directory. https://goo.gl/GijGKP')
47+
throw new Error('BRANCH SDK: Cannot read build.json within your root directory. Docs https://goo.gl/GijGKP')
4848
}
4949
}
5050

hooks/lib/npm/nodeDependencies.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
installNodeModules(modules, function (err) {
3131
if (err) {
3232
// handle error
33-
throw new Error('BRANCH SDK: Failed to install the Branch SDK. https://goo.gl/GijGKP')
33+
throw new Error('BRANCH SDK: Failed to install the Branch SDK. Docs https://goo.gl/GijGKP')
3434
} else {
3535
// only run once
3636
setPackageInstalled(installFlagLocation)
@@ -59,7 +59,7 @@
5959
// handle error
6060
if (err) {
6161
callback(true)
62-
throw new Error('BRANCH SDK: Failed to install Branch node dependency ' + module + '. https://goo.gl/GijGKP')
62+
throw new Error('BRANCH SDK: Failed to install Branch node dependency ' + module + '. Docs https://goo.gl/GijGKP')
6363
} else {
6464
// next module
6565
installNodeModules(modules, callback)

hooks/lib/sdk/configXml.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
var configXml = xmlHelper.readXmlAsJson(pathToConfigXml)
2828

2929
if (configXml == null) {
30-
throw new Error('BRANCH SDK: A config.xml is not found in project\'s root directory. https://goo.gl/GijGKP')
30+
throw new Error('BRANCH SDK: A config.xml is not found in project\'s root directory. Docs https://goo.gl/GijGKP')
3131
}
3232

3333
return configXml
@@ -38,7 +38,7 @@
3838
var branchConfig = configXml.widget['branch-config']
3939

4040
if (branchConfig == null || branchConfig.length === 0) {
41-
throw new Error('BRANCH SDK: <branch-config> tag is not set in the config.xml. https://goo.gl/GijGKP')
41+
throw new Error('BRANCH SDK: <branch-config> tag is not set in the config.xml. Docs https://goo.gl/GijGKP')
4242
}
4343

4444
return branchConfig[0]
@@ -91,13 +91,13 @@
9191
// validate <branch-config> properties within config.xml
9292
function validateBranchPreferences (preferences) {
9393
if (preferences.bundleId === null) {
94-
throw new Error('BRANCH SDK: Missing "widget id" in your config.xml. https://goo.gl/GijGKP')
94+
throw new Error('BRANCH SDK: Invalid "widget id" in your config.xml. Docs https://goo.gl/GijGKP')
9595
}
9696
if (preferences.bundleName === null) {
97-
throw new Error('BRANCH SDK: Missing "name" in your config.xml. https://goo.gl/GijGKP')
97+
throw new Error('BRANCH SDK: Invalid "name" in your config.xml. Docs https://goo.gl/GijGKP')
9898
}
9999
if (preferences.branchKey === null) {
100-
throw new Error('BRANCH SDK: Missing "branch-key" in <branch-config> in your config.xml. https://goo.gl/GijGKP')
100+
throw new Error('BRANCH SDK: Invalid "branch-key" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP')
101101
}
102102
if (preferences.uriScheme === null || !/^[a-zA-Z0-9-.]*$/.test(preferences.uriScheme)) {
103103
throw new Error('BRANCH SDK: Invalid "uri-scheme" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP')

www/branch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ Branch.prototype.initSession = function (deepLinkDataListener) {
4848

4949
if (!disableGlobalListenersWarnings && !deepLinkDataListener && !window.DeepLinkHandler) {
5050
// missing deep link data return
51-
console.warn('BRANCH SDK: No callback in initSession and no global DeepLinkHandler method. No Branch deep link data will be returned. https://goo.gl/GijGKP')
51+
console.warn('BRANCH SDK: No callback in initSession and no global DeepLinkHandler method. No Branch deep link data will be returned. Docs https://goo.gl/GijGKP')
5252
} else if (!disableGlobalListenersWarnings && window.DeepLinkHandler !== undefined && window.DeepLinkHandler.toString() !== deepLinkDataParser.toString()) {
5353
// deprecated 3.0.0: open and non deep link data will pass into DeepLinkHandler
54-
console.warn('BRANCH SDK: Your DeepLinkHandler has changed. It will now pass non-Branch data. https://goo.gl/GijGKP')
54+
console.warn('BRANCH SDK: Your DeepLinkHandler has changed. It will now pass non-Branch data. Docs https://goo.gl/GijGKP')
5555
} else {
5656
// from iOS and Android SDKs to JavaScript
5757
window.DeepLinkHandler = deepLinkDataParser

0 commit comments

Comments
 (0)