Skip to content

Commit

Permalink
add error msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-Meldrum committed Mar 28, 2020
1 parent 653ea17 commit b57b6b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ impl KompactConfig {
/// Larger values can increase throughput on highly loaded components,
/// but at the cost of fairness between components.
pub fn throughput(&mut self, n: usize) -> &mut Self {
assert!(n > 0);
assert!(n > 0, "throughput must be larger than 0");
self.throughput = n;
self
}
Expand All @@ -195,7 +195,7 @@ impl KompactConfig {
/// the remaining allotment will be redistributed to the other type
/// until all throughput is used up or no messages or events remain.
pub fn msg_priority(&mut self, r: f32) -> &mut Self {
assert!(r > 0.0);
assert!(r > 0.0, "msg_priority must be larger than 0.0");
self.msg_priority = r;
self
}
Expand All @@ -207,7 +207,7 @@ impl KompactConfig {
/// You *must* ensure that the selected [scheduler](KompactConfig::scheduler) implementation
/// can manage the given number of threads, if you customise this value!
pub fn threads(&mut self, n: usize) -> &mut Self {
assert!(n > 0);
assert!(n > 0, "threads must be larger than 0");
self.threads = n;
self
}
Expand Down

0 comments on commit b57b6b2

Please sign in to comment.