Lines Matching defs:CustomSubError
60 class CustomSubError : public ErrorInfo<CustomSubError, CustomError> {
63 CustomSubError(int Info, int ExtraInfo) : ExtraInfo(ExtraInfo) {
72 OS << "CustomSubError { " << getInfo() << ", " << getExtraInfo() << "}";
76 llvm_unreachable("CustomSubError doesn't support ECError conversion");
86 char CustomSubError::ID = 0;
161 Error F = make_error<CustomSubError>(1, 2);
165 EXPECT_FALSE(E.isA<CustomSubError>());
167 EXPECT_TRUE(F.isA<CustomSubError>());
250 handleAllErrors(make_error<CustomSubError>(42, 7),
251 [&](const CustomSubError &SE) {
256 EXPECT_EQ(CaughtErrorInfo, 42) << "Wrong result from CustomSubError handler";
258 << "Wrong result from CustomSubError handler";
267 handleAllErrors(make_error<CustomSubError>(42, 7),
268 [&](const CustomSubError &SE) {
286 make_error<CustomSubError>(42, 7),
288 [&](const CustomSubError &SE) {
307 joinErrors(make_error<CustomError>(7), make_error<CustomSubError>(42, 7));
310 [&](const CustomSubError &SE) {
317 // CustomSubError - joinErrors should preserve error
391 handleAllErrors(make_error<CustomError>(7), [&](const CustomSubError &SE) {
412 [&](std::unique_ptr<CustomSubError> SE) {
479 if (E.isA<CustomSubError>())
498 EXPECT_EXIT(ExitOnErr(Expected<int>(make_error<CustomSubError>(0, 0))),
808 EXPECT_THAT_ERROR(make_error<CustomError>(0), Failed<CustomSubError>()),
921 unwrap(wrap(joinErrors(make_error<CustomSubError>(42, 7),
923 [&](CustomSubError &CSE) {