Skip to content

Commit 1be34a6

Browse files
committed
cli(errors): simplify uncaught exception tip and recommend RAII
- Replace multiple verbose tips with a single concise guidance line - Recommend catching exceptions in main() and relying on RAII - Keep runtime error output short, focused, and terminal-friendly
1 parent e952a04 commit 1be34a6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/errors/rules/UncaughtExceptionRule.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ namespace vix::cli::errors::rules
181181
std::cerr << "\n"
182182
<< YELLOW << "tip:" << RESET << " wrap main() with try/catch (to print e.what())\n";
183183

184+
std::cerr << "\n"
185+
<< YELLOW << "tip:" << RESET
186+
<< " catch exceptions in main() and rely on RAII (no raw new/delete)\n";
187+
184188
// location + code frame (si possible)
185189
if (!sourceFile.empty())
186190
std::cerr << GREEN << "source:" << RESET << " " << sourceFile.filename().string() << "\n";

0 commit comments

Comments
 (0)