summaryrefslogtreecommitdiff
path: root/mingling_core/src
diff options
context:
space:
mode:
Diffstat (limited to 'mingling_core/src')
-rw-r--r--mingling_core/src/program.rs2
-rw-r--r--mingling_core/src/program/exec.rs5
2 files changed, 4 insertions, 3 deletions
diff --git a/mingling_core/src/program.rs b/mingling_core/src/program.rs
index 1c8c0b4..ffba17e 100644
--- a/mingling_core/src/program.rs
+++ b/mingling_core/src/program.rs
@@ -88,6 +88,8 @@ where
pub trait ProgramCollect {
type Enum: Display;
+ fn build_renderer_not_found(member_id: Self::Enum) -> AnyOutput<Self::Enum>;
+ fn build_dispatcher_not_found(args: Vec<String>) -> AnyOutput<Self::Enum>;
fn render(any: AnyOutput<Self::Enum>, r: &mut RenderResult);
fn do_chain(
any: AnyOutput<Self::Enum>,
diff --git a/mingling_core/src/program/exec.rs b/mingling_core/src/program/exec.rs
index cdbb2b0..bf025fd 100644
--- a/mingling_core/src/program/exec.rs
+++ b/mingling_core/src/program/exec.rs
@@ -28,7 +28,7 @@ where
}
Err(ProgramInternalExecuteError::DispatcherNotFound) => {
// No matching Dispatcher is found
- return Err(ProgramInternalExecuteError::DispatcherNotFound);
+ current = C::build_dispatcher_not_found(program.args);
}
Err(e) => return Err(e),
};
@@ -51,8 +51,7 @@ where
}
// No renderer exists
else {
- let renderer_name = current.member_id.to_string();
- return Err(ProgramInternalExecuteError::RendererNotFound(renderer_name));
+ C::build_renderer_not_found(current.member_id)
}
};
}