Skip to content

Commit 4e5a7fb

Browse files
committed
Improve handling of unknown errors
1 parent 6cf72f9 commit 4e5a7fb

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/runWithArgs.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@ export async function runWithArgs(args: string[]) {
1515
if (e instanceof HandledError) {
1616
consoleLog(e.message);
1717
} else {
18+
// output
1819
consoleLog('\n');
19-
consoleLog(chalk.bold('⚠️ An unknown error occurred ⚠️'));
20-
consoleLog(e.message);
20+
consoleLog(chalk.bold('⚠️ Ouch! An unknown error occured 😿'));
21+
consoleLog(`Error message: ${e.message}`);
22+
23+
consoleLog(
24+
'Please open an issue in https://github.com/sqren/backport/issues or contact me directly on https://twitter.com/sorenlouv'
25+
);
26+
2127
consoleLog(
22-
chalk.italic(
23-
`Please check the logs for addtional details: ${getLogfilePath()}`
24-
)
28+
chalk.italic(`For additional details see the logs: ${getLogfilePath()}`)
2529
);
30+
31+
// log file
2632
logger.info('Unknown error:', e);
2733
}
2834

0 commit comments

Comments
 (0)