Skip to main content

office_rs/error/format/
pptx.rs

1use thiserror::Error;
2
3/// PowerPoint特定错误
4#[derive(Error, Debug)]
5pub enum PptxError {
6    #[error("幻灯片不存在: {slide_id}")] SlideNotFound {
7        slide_id: String,
8    },
9
10    #[error("布局不存在: {layout_id}")] LayoutNotFound {
11        layout_id: String,
12    },
13
14    #[error("形状ID无效: {shape_id}")] InvalidShapeId {
15        shape_id: String,
16    },
17
18    #[error("动画配置错误: {reason}")] InvalidAnimation {
19        reason: String,
20    },
21}