1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
use alloc::boxed::Box;
use crate::{daemonic::{
frame::{Frame, FrameType, ReferenceFrame},
glass::{Glass, Observation},
Anchor,
AnchorDomainSet,
SymbolicAnchor,
TopologySegment,
}, DaemonicError, SemanticAnchor, DaemonicEmission};
pub use daemonic::*;
pub use generic::*;
use crate::compiler::DaemonicC;
pub mod compiler;
impl Frame for Error {
fn frame_type(&self) -> FrameType {
todo!()
}
}
impl Anchor for Error {
fn anchor_domains(&self) -> AnchorDomainSet {
todo!()
}
}
impl ReferenceFrame for Error {
fn origin(&self) -> &TopologySegment {
todo!()
}
}
pub enum Error {
/// Use generic variant for simple or quick errors
Generic(GenericVariants),
/// Use this variant for LIBC compatible errors with ERRNO table and conversion methods
OS(os::OsError),
/// Daemonic Error variants with richer context than Generic or OS level returns
/// Shade, Entity, and Symbolic errors are here.
Daemonic(DaemonicVariants),
Compiler(DaemonicC),
}
impl Error {
// pub fn build_from_topology(error_topology: &TopologySegment, build_topology: &TopologySegment) -> Self {
// match error_topology.label {
// "Daemonic::Glass::Error::Daemonic::Glass::Cracked<GLASS>" => {
// this shit probably isnt right so im going to just say fuck it and loop back later with a different plan
// Error::Daemonic(
// DaemonicVariants::Glass(
// GlassError::GlassOBSStructs(
// DaemonicEmission {
// inner: Box::new(crate::daemonic::observation::Stable::new(
// Error(DaemonicVariants::Glass(GlassError::GlassOBSStructs())),
// build_topology))
// })))
// Error::Daemonic(DaemonicVariants::Glass(GlassError::GlassStates(emission)))
// }
// "Daemonic::Glass::Error::Daemonic::Glass::Fractured<GLASS>" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Drift<GLASS>" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Echo<GLASS>" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Opaque<GLASS>" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Warped<GLASS>" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Impossible<(!)>" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Shattered" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Paradox<GLASS>" => {}
// "Daemonic::Glass::Error::Daemonic::Glass::Unknown<GLASS>" => {}
// "Daemonic::GenericVariants::" => {}
// "Daemonic::OS::" => {}
// "Daemonic::DaemonicVariants::" => {}
// _ => {
// Self // this is a stub
// }
// }
// }
// pub fn build_cracked_emission<GLASS>(payload: Option<GLASS>, error_top: &TopologySegment, emission_top: &TopologySegment) -> Error {
// Error::Daemonic(DaemonicVariants::Glass(GlassError::GlassOBSStructs(
// DaemonicEmission::new(crate::daemonic::observation::Stable::new((), emission_top)
// ))))
// }
}
static ERROR_SEGMENT: TopologySegment = TopologySegment::new("Daemonic::Glass::Error");
impl<'error> DaemonicError<'error> for Error {
fn emit(self) -> DaemonicEmission {
todo!("needs shit")
}
fn position(&self) -> &TopologySegment {
&ERROR_SEGMENT
}
}
pub mod os;
pub mod daemonic;
pub mod generic;
pub mod physics_violation;