You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-12 22:57:38 +02:00
Better error handling during sync setup
This commit is contained in:
@ -69,7 +69,11 @@ class Setting extends BaseModel {
|
||||
}
|
||||
|
||||
static value(key) {
|
||||
if (key in this.constants_) return this.constants_[key];
|
||||
if (key in this.constants_) {
|
||||
let output = this.constants_[key];
|
||||
if (output == 'SET_ME') throw new Error('Setting constant has not been set: ' + key);
|
||||
return output;
|
||||
}
|
||||
|
||||
if (!this.cache_) throw new Error('Settings have not been initialized!');
|
||||
|
||||
@ -153,6 +157,7 @@ Setting.defaults_ = {
|
||||
Setting.constants_ = {
|
||||
'appName': 'joplin',
|
||||
'appId': 'SET_ME', // Each app should set this identifier
|
||||
'appType': 'SET_ME', // 'cli' or 'mobile'
|
||||
'resourceDir': '',
|
||||
'profileDir': '',
|
||||
'tempDir': '',
|
||||
|
Reference in New Issue
Block a user