Commit cc2050ac authored by Dominik Charousset's avatar Dominik Charousset

Improve error reporting

parent c687b56c
...@@ -214,7 +214,8 @@ public: ...@@ -214,7 +214,8 @@ public:
delta_offset_ = offset_; delta_offset_ = offset_;
} else if (consumed < 0) { } else if (consumed < 0) {
upper_layer_.abort(this_layer_ptr, upper_layer_.abort(this_layer_ptr,
parent->abort_reason_or(caf::sec::runtime_error)); parent->abort_reason_or(caf::sec::runtime_error,
"consumed < 0"));
return false; return false;
} }
// Our thresholds may have changed if the upper layer called // Our thresholds may have changed if the upper layer called
...@@ -252,7 +253,8 @@ public: ...@@ -252,7 +253,8 @@ public:
auto this_layer_ptr = make_stream_oriented_layer_ptr(this, parent); auto this_layer_ptr = make_stream_oriented_layer_ptr(this, parent);
if (!upper_layer_.prepare_send(this_layer_ptr)) { if (!upper_layer_.prepare_send(this_layer_ptr)) {
upper_layer_.abort(this_layer_ptr, upper_layer_.abort(this_layer_ptr,
parent->abort_reason_or(caf::sec::runtime_error)); parent->abort_reason_or(caf::sec::runtime_error,
"prepare_send failed"));
return false; return false;
} }
if (write_buf_.empty()) if (write_buf_.empty())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment