🎥 Make videos programmatically with React
log improvements
Jonny Burgerb24b1bdd7c23
diff --git a/packages/cli/src/print-error.ts b/packages/cli/src/print-error.tsindex fdcb97a3fb..5c3a1c167f 100644--- a/packages/cli/src/print-error.ts+++ b/packages/cli/src/print-error.ts@@ -1,21 +1,31 @@import {RenderInternals} from '@remotion/renderer';+import chalk from 'chalk';import {printCodeFrameAndStack} from './code-frame';import {Log} from './log';+import {createOverwriteableCliOutput} from './progress-bar';export const printError = async (err: Error) => {if (err instanceof RenderInternals.SymbolicateableError) {+ const output = createOverwriteableCliOutput(false);+ output.update(+ chalk.red('Symbolicating minified error message...\n' + err.message)+ );try {const symbolicated = await RenderInternals.symbolicateError(err);if (symbolicated.frame === null) {- Log.error('An error occurred:');+ output.update(chalk.red('An error occurred:\n'));} else {- Log.error(`An error occurred while rendering frame ${err.frame}:`);+ output.update(+ chalk.red(`An error occurred while rendering frame ${err.frame}:\n`)+ );}printCodeFrameAndStack(symbolicated);} catch (e) {- Log.error(- '(Error occurred symbolicating stack trace - printing minified stack trace)'+ output.update(+ chalk.red(+ '(Error occurred symbolicating stack trace - printing minified stack trace)\n'+ ));Log.error(err.stack || err);}diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.tsindex 0456c16e8a..c21c145e3e 100644--- a/packages/lambda/src/cli/commands/render/render.ts+++ b/packages/lambda/src/cli/commands/render/render.ts@@ -253,7 +253,6 @@ export const renderCommand = async (args: string[]) => {await CliInternals.handleCommonError(errorWithStackFrame);}- Log.error('Fatal error encountered. Exiting.');quit(1);}}diff --git a/packages/lambda/src/cli/commands/still.ts b/packages/lambda/src/cli/commands/still.tsindex 7372b4a7cc..b95b88c3c3 100644--- a/packages/lambda/src/cli/commands/still.ts+++ b/packages/lambda/src/cli/commands/still.ts@@ -132,5 +132,6 @@ export const stillCommand = async (args: string[]) => {stackFrame: frames,});await CliInternals.handleCommonError(errorWithStackFrame);+ quit(1);}};