-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67164/#review203314
-----------------------------------------------------------



Thanks for tackling this.

Could you link MESOS-7220? We should also clean up uses of 
`EXPECT_TRUE(.*isError())` and `ASSERT_TRUE(.*isError())` in follow-up patches.


3rdparty/stout/include/stout/gtest.hpp
Lines 61 (patched)
<https://reviews.apache.org/r/67164/#comment285421>

    While this gets the job done, it couples us rather tightly to `Error` as 
opposed to being generic (we e.g., assume that `E::message()` exists which 
works since `Try` enforces any of its `E` to derive from `Error`).
    
    What would you think about instead adding a
    
        ostream& operator<<(ostream&, const Error&);
        
    and additionally parameterizing the existing `AssertSome` on `E` as well? 
That would not only decouple us from the requirements `Try` puts on `E`, but 
also provide a dedicated future customization point for how custom error types 
are represented (currently just through how the base `Error` is constructed). 
It would also not require us to duplicate the implementation.


- Benjamin Bannier


On May 17, 2018, 12:02 a.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67164/
> -----------------------------------------------------------
> 
> (Updated May 17, 2018, 12:02 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Supported custom error types for `Try` in `AssertSome`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/gtest.hpp 
> a40e8101b5c09d419462212e5871fe382f572bf4 
> 
> 
> Diff: https://reviews.apache.org/r/67164/diff/1/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>

Reply via email to