Skip to content

Commit

Permalink
re-enable it
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Dec 1, 2023
1 parent f13b55d commit d80b56d
Show file tree
Hide file tree
Showing 14 changed files with 259 additions and 150 deletions.
134 changes: 100 additions & 34 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["turf_processing"]
default = ["turf_processing", "katmos"]
zas_hooks = []
turf_processing = []
superconductivity = ["turf_processing"]
Expand Down Expand Up @@ -50,7 +50,7 @@ ahash = "0.8.6"
lazy_static = "1.4.0"
indexmap = { version = "2.1.0", features = ["rayon"] }
dashmap = { version = "5.5.3", features = ["rayon"] }
hashbrown = "0.14.2"
hashbrown = "0.14.3"
atomic_float = "0.1.0"
petgraph = "0.6.4"
bitflags = "2.4.1"
Expand Down
12 changes: 10 additions & 2 deletions crates/auxcallback/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ fn process_callbacks() {
for callback in receiver.try_iter() {
if let Err(e) = callback() {
let error_string = format!("{e:?}").try_into().unwrap();
byondapi::global_call::call_global("stack_trace", &[error_string]).unwrap();
byondapi::global_call::call_global_id(
byond_string!("stack_trace"),
&[error_string],
)
.unwrap();
}
}
})
Expand All @@ -56,7 +60,11 @@ fn process_callbacks_for(duration: Duration) -> bool {
for callback in receiver.try_iter() {
if let Err(e) = callback() {
let error_string = format!("{e:?}").try_into().unwrap();
byondapi::global_call::call_global("stack_trace", &[error_string]).unwrap();
byondapi::global_call::call_global_id(
byond_string!("stack_trace"),
&[error_string],
)
.unwrap();
}
if timer.elapsed() >= duration {
return true;
Expand Down
4 changes: 2 additions & 2 deletions crates/byondapi-binds/byondapi-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub fn bind(attr: TokenStream, item: TokenStream) -> TokenStream {
Ok(val) => val,
Err(e) => {
let error_string = ::byondapi::value::ByondValue::try_from(::std::format!("{e:?}")).unwrap();
::byondapi::global_call::call_global("stack_trace", &[error_string]).unwrap();
::byondapi::global_call::call_global_id(byond_string!("stack_trace"), &[error_string]).unwrap();
::byondapi::value::ByondValue::null()
}
}
Expand Down Expand Up @@ -204,7 +204,7 @@ pub fn bind_raw_args(attr: TokenStream, item: TokenStream) -> TokenStream {
Ok(val) => val,
Err(e) => {
let error_string = ::byondapi::value::ByondValue::try_from(::std::format!("{e:?}")).unwrap();
::byondapi::global_call::call_global("stack_trace", &[error_string]).unwrap();
::byondapi::global_call::call_global_id(byond_string!("stack_trace"), &[error_string]).unwrap();
::byondapi::value::ByondValue::null()
}
}
Expand Down
Loading

0 comments on commit d80b56d

Please sign in to comment.