refactor: errors changed to one standard
This commit is contained in:
parent
78c5ab1a72
commit
f32349717f
@ -46,9 +46,9 @@ export class BufferReader {
|
|||||||
if (length > bytesAvailable) {
|
if (length > bytesAvailable) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Not enough bytes left. Requested: " +
|
"Not enough bytes left. Requested: " +
|
||||||
length +
|
length +
|
||||||
" left: " +
|
" left: " +
|
||||||
bytesAvailable,
|
bytesAvailable,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ export function decodeProto(buffer) {
|
|||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
reader.resetToCheckpoint();
|
reader.resetToCheckpoint();
|
||||||
console.log(err);
|
console.log(`ERR: ${err}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -22,7 +22,7 @@ Page(
|
|||||||
this.initPage();
|
this.initPage();
|
||||||
})
|
})
|
||||||
.catch((x) => {
|
.catch((x) => {
|
||||||
console.log(`Init failed: ${x}`);
|
console.log(`ERR: Init failed - ${x}`);
|
||||||
try {
|
try {
|
||||||
let localStorage = new LocalStorage();
|
let localStorage = new LocalStorage();
|
||||||
app._options.globalData.TOTPS = JSON.parse(
|
app._options.globalData.TOTPS = JSON.parse(
|
||||||
|
@ -33,7 +33,7 @@ AppSettingsPage({
|
|||||||
onChange: (changes) => {
|
onChange: (changes) => {
|
||||||
let link = getTOTPByLink(changes);
|
let link = getTOTPByLink(changes);
|
||||||
if (link == null) {
|
if (link == null) {
|
||||||
console.log("link is invalid");
|
console.log("ERR: link is invalid");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ function GetTOTPList(storage) {
|
|||||||
storage[elementId] = link;
|
storage[elementId] = link;
|
||||||
updateStorage(storage);
|
updateStorage(storage);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(`ERR: ${err}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
labelStyle: {
|
labelStyle: {
|
||||||
|
@ -56,7 +56,7 @@ function getByOtpauthScheme(link) {
|
|||||||
getHashType(algorithm),
|
getHashType(algorithm),
|
||||||
);
|
);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(`ERR: ${err}`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user