{"record":{"id":"5c4eb08c9383bc37","repo":"quarkusio/quarkus","slug":"e-getmessage-5c4eb0","errorCode":null,"errorMessage":"${e.getMessage()}","messagePattern":"\\$\\{e\\.getMessage\\(\\)\\}","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java","lineNumber":154,"sourceCode":"        invoker.rewriteDryRun(rewriteDryRun);\n\n        // backward compat\n        if (noRewrite != null && noRewrite) {\n            rewrite = false;\n        }\n\n        if (rewrite != null) {\n            invoker.rewrite(rewrite);\n        }\n\n        try {\n            final QuarkusCommandOutcome result = invoker.execute();\n            if (!result.isSuccess()) {\n                throw new MojoExecutionException(\n                        \"Failed to apply the updates: \" + result.getMessage());\n            }\n        } catch (QuarkusUpdateExitErrorException e) {\n            throw new MojoExecutionException(e.getMessage());\n        } catch (QuarkusCommandException e) {\n            throw new MojoExecutionException(\"Failed to apply the updates\", e);\n        }\n    }\n\n    private static ArtifactCoords getPrimaryBom(ExtensionCatalog c) {\n        return c.getDerivedFrom().isEmpty() ? c.getBom() : c.getDerivedFrom().get(0).getBom();\n    }\n}\n","sourceCodeStart":136,"sourceCodeEnd":164,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java#L136-L164","documentation":"When the update command throws QuarkusUpdateExitErrorException (the command explicitly exited with an error, e.g. an embedded interactive updater like an SQL/JBang migration script requested an exit-with-error), UpdateMojo rethrows MojoExecutionException with just e.getMessage(). The message is whatever the update tooling put on the exception — it is deliberately surfaced verbatim.","triggerScenarios":"invoker.execute() throws QuarkusUpdateExitErrorException during processProjectState: the update command ran a step (often an external migration script) that terminated with a non-zero exit code, signalling the update must be aborted.","commonSituations":"Migration scripts invoked by quarkus:update failing (e.g. deprecated-API migration tool errors); script requires user input but runs non-interactively; platform-provided update scripts incompatible with the project state.","solutions":["Read the propagated e.getMessage() — it is the update tool's own error text","Re-run quarkus:update interactively (attached terminal) so prompts in migration scripts can be answered","Run the failing migration step manually, then retry quarkus:update","Skip scripted migration by updating quarkus.platform.version manually and handle code changes yourself"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Run non-interactive migration steps in a probe first:\nmvn quarkus:update -DdryRun  # if supported, to surface script errors before applying","typeGuard":null,"tryCatchPattern":"catch (MojoExecutionException e) {\n  if (e.getMessage() == null || e.getMessage().isEmpty()) {\n    log.error(\"Update script exited with error and no message; rerun with -X for details\");\n  } else {\n    log.error(\"Migration tool error: {}\", e.getMessage());\n  }\n}","preventionTips":["Run quarkus:update in an attached interactive terminal so scripts can prompt","Test updates on a branch; commit before applying","Perform scripted migrations as separate documented steps when CI is non-interactive","Keep migration tooling versions in sync with the target Quarkus version"],"tags":["maven","quarkus","upgrade"],"backgroundTag":"update-script-exit-error","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}