mirror of
https://github.com/wukko/cobalt.git
synced 2025-02-02 08:26:22 +01:00
all: add space after catch
This commit is contained in:
parent
4c006b2291
commit
f7dc6cebad
4 changed files with 7 additions and 7 deletions
|
@ -27,7 +27,7 @@ const setupMain = async (cookiePath) => {
|
||||||
cluster.broadcast({ cookies });
|
cluster.broadcast({ cookies });
|
||||||
|
|
||||||
console.log(`${Green('[✓]')} cookies loaded successfully!`);
|
console.log(`${Green('[✓]')} cookies loaded successfully!`);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
console.error(`${Yellow('[!]')} failed to load cookies.`);
|
console.error(`${Yellow('[!]')} failed to load cookies.`);
|
||||||
console.error('error:', e);
|
console.error('error:', e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ export default async function(o) {
|
||||||
dispatcher: o.dispatcher
|
dispatcher: o.dispatcher
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
if (e.message?.endsWith("decipher algorithm")) {
|
if (e.message?.endsWith("decipher algorithm")) {
|
||||||
return { error: "youtube.decipher" }
|
return { error: "youtube.decipher" }
|
||||||
} else if (e.message?.includes("refresh access token")) {
|
} else if (e.message?.includes("refresh access token")) {
|
||||||
|
@ -142,7 +142,7 @@ export default async function(o) {
|
||||||
let info;
|
let info;
|
||||||
try {
|
try {
|
||||||
info = await yt.getBasicInfo(o.id, useHLS ? 'IOS' : 'ANDROID');
|
info = await yt.getBasicInfo(o.id, useHLS ? 'IOS' : 'ANDROID');
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
if (e?.info?.reason === "This video is private") {
|
if (e?.info?.reason === "This video is private") {
|
||||||
return { error: "content.video.private" };
|
return { error: "content.video.private" };
|
||||||
} else if (e?.message === "This video is unavailable") {
|
} else if (e?.message === "This video is unavailable") {
|
||||||
|
|
|
@ -31,7 +31,7 @@ const runTestsFor = async (service) => {
|
||||||
await runTest(url, params, expected);
|
await runTest(url, params, expected);
|
||||||
console.log(`${service}/${name}: ok`);
|
console.log(`${service}/${name}: ok`);
|
||||||
|
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
softFails += !canFail;
|
softFails += !canFail;
|
||||||
fails++;
|
fails++;
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ switch (action) {
|
||||||
try {
|
try {
|
||||||
const { softFails } = await runTestsFor(process.argv[3]);
|
const { softFails } = await runTestsFor(process.argv[3]);
|
||||||
process.exitCode = Number(!!softFails);
|
process.exitCode = Number(!!softFails);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
process.exitCode = 1;
|
process.exitCode = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -114,7 +114,7 @@ export default class LibAVWrapper {
|
||||||
if (name === 'progress.txt') {
|
if (name === 'progress.txt') {
|
||||||
try {
|
try {
|
||||||
return this.#emitProgress(data);
|
return this.#emitProgress(data);
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
} else if (name !== outputName) return;
|
} else if (name !== outputName) return;
|
||||||
|
|
Loading…
Reference in a new issue