Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b14cf4e
feat: added implementations for number functions
raphael-goetz Jun 2, 2025
0823fbe
dependencies: added rand
raphael-goetz Jun 2, 2025
0742756
feat: moved number mod and added tests for the functions
raphael-goetz Jun 3, 2025
fe1e7f5
feat: added boolean std functions
raphael-goetz Jun 3, 2025
e91ea00
fix: removed boolean
raphael-goetz Jun 3, 2025
e93f771
fix: removed boolean
raphael-goetz Jun 3, 2025
cc84cb1
Merge branch '21-std-runtime-function-number' of https://github.com/c…
raphael-goetz Jun 3, 2025
cccab4b
feat: added error messages
raphael-goetz Jun 3, 2025
cd5ffb9
Merge pull request #38 from code0-tech/22-std-runtime-function-boolean
raphael-goetz Jun 3, 2025
f0c2532
feat: added error description for boolean
raphael-goetz Jun 3, 2025
9b67ba0
fix: added missing fields
raphael-goetz Jun 3, 2025
a5206c2
feat: added most of the mvp text function implementations
raphael-goetz Jun 4, 2025
620efe3
feat: added missing text functions (exepct encode & decode)
raphael-goetz Jun 5, 2025
1f447fc
dependencies: added base64
raphael-goetz Jun 6, 2025
ff30ac1
feat: added encode and decode function implementation
raphael-goetz Jun 6, 2025
48b1b87
fix: correct error messages for text functions
raphael-goetz Jun 6, 2025
c1890eb
Merge pull request #44 from code0-tech/23-std-runtime-function-text
raphael-goetz Jun 6, 2025
acd6e21
Merge branch 'main' into 21-std-runtime-function-number
raphael-goetz Jun 6, 2025
21e534e
fix: removed locale from main function
raphael-goetz Jun 6, 2025
07c3d9c
ref: fixed typo
raphael-goetz Jun 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ tokio = { version = "1.44.1", features = ["rt-multi-thread"] }
toml = "0.8.0"
log = "0.4.27"
futures-lite = "2.6.0"
rand = "0.9.1"
base64 = "0.22.1"
env_logger = "0.11.8"

[dev-dependencies]
Expand Down
32 changes: 31 additions & 1 deletion src/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ use std::{
};

#[derive(Debug, Default, Clone)]
pub struct RuntimeError {}
pub struct RuntimeError {
name: String,
message: String,
suggestion: Option<String>,
}

impl Error for RuntimeError {}

Expand All @@ -13,3 +17,29 @@ impl Display for RuntimeError {
write!(f, "&self.function_name.as_str()")
}
}

impl RuntimeError {
pub fn new(name: String, message: String, suggestion: Option<String>) -> Self {
Self {
name,
message,
suggestion,
}
}

pub fn simple_str(name: &str, message: &str) -> Self {
Self {
name: name.to_string(),
message: message.to_string(),
suggestion: None,
}
}

pub fn simple(name: &str, message: String) -> Self {
Self {
name: name.to_string(),
message: message,
suggestion: None,
}
}
}
Loading