{"record":{"id":"da4b9d55e194d765","repo":"flxzt/rnote","slug":"exporting-selection-to-format-with-extension-ext","errorCode":null,"errorMessage":"Exporting selection to format with extension \"{ext}\" is not supported.","messagePattern":"Exporting selection to format with extension \"(.+?)\" is not supported\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/rnote-cli/src/export.rs","lineNumber":409,"sourceCode":"    let prefs = SelectionExportPrefs {\n        export_format: format,\n        with_background: !no_background,\n        with_pattern: !no_pattern,\n        optimize_printing,\n        bitmap_scalefactor,\n        jpeg_quality,\n        margin,\n    };\n\n    Ok(prefs)\n}\n\nfn get_selection_export_format(format: &str) -> anyhow::Result<SelectionExportFormat> {\n    match format {\n        \"svg\" => Ok(SelectionExportFormat::Svg),\n        \"png\" => Ok(SelectionExportFormat::Png),\n        \"jpg\" | \"jpeg\" => Ok(SelectionExportFormat::Jpeg),\n        ext => Err(anyhow::anyhow!(\n            \"Exporting selection to format with extension \\\"{ext}\\\" is not supported.\"\n        )),\n    }\n}\n\npub(crate) fn get_output_file_path(\n    initial_output_file: &Path,\n    on_conflict: OnConflict,\n    on_conflict_overwrite: &mut Option<OnConflict>,\n    export_command: &cli::ExportCommand,\n) -> anyhow::Result<PathBuf> {\n    match export_command {\n        // output file will be ignored when parsing output file\n        cli::ExportCommand::DocPages { .. } => Ok(initial_output_file.to_path_buf()),\n        _ => Ok(file_conflict_prompt_action(\n            initial_output_file,\n            on_conflict,\n            on_conflict_overwrite,","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/flxzt/rnote/blob/bbc5354502ba2fc83eec2670b535348825e679a6/crates/rnote-cli/src/export.rs#L391-L427","documentation":"Validation error in get_selection_export_format: the user-supplied --export-format string does not match any supported selection export extension (svg, png, jpg, jpeg), so no SelectionExportFormat variant can be built and selection export cannot proceed.","triggerScenarios":"Thrown at crates/rnote-cli/src/export.rs:409 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run with a supported --export-format value: svg, png, jpg, or jpeg.","Check the format string for typos or casing; matching is exact and case-sensitive."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bbc5354502ba2fc83eec2670b535348825e679a6","analyzedAt":"2026-09-08T13:20:33.747Z","contentChangedAt":"2026-09-08T13:20:33.747Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}