-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
A-rustArea: Rust glueArea: Rust glueC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Experience needed to fix: Easy / not muchCall for participation: Experience needed to fix: Easy / not muchP-lowLow priorityLow priority
Description
There is a call to eprintln!
macro within singleton registration callback. It seems like a good place for logging frameworks instead. We could use error!
from the Rust logging facade or qFatal
from Qt + cpp!
side. Since rust logging facade is feature-flagged, probably calling Qt would make more sense, or feature-flag double-implementation to avoid round-trips when rust logging is enabled.
qmetaobject-rs/qmetaobject/src/qtdeclarative.rs
Lines 489 to 492 in 582ce49
Err(_panic) => { | |
eprintln!("qml_register_singleton_type T::default or T::init panicked."); | |
std::process::abort() | |
} |
By the way,
qCritical
(citing) "exits if the environment variableQT_FATAL_CRITICALS
is not empty", andqFatal
(citing) "using the default message handler this function will abort to create a core dump".
I don't remember implementing aborts in rust message handler in #86 🤔
jalcine
Metadata
Metadata
Assignees
Labels
A-rustArea: Rust glueArea: Rust glueC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Experience needed to fix: Easy / not muchCall for participation: Experience needed to fix: Easy / not muchP-lowLow priorityLow priority