Skip to content

Commit d07a38c

Browse files
committed
Merge branch 'master' of https://github.com/zajo/leaf
2 parents 9b1ad59 + 0e8ce03 commit d07a38c

File tree

2 files changed

+60
-24
lines changed

2 files changed

+60
-24
lines changed

include/boost/leaf/all.hpp

+40-16
Original file line numberDiff line numberDiff line change
@@ -10487,10 +10487,16 @@ namespace boost { namespace leaf {
1048710487

1048810488
friend std::ostream & operator<<( std::ostream & os, diagnostic_info const & x )
1048910489
{
10490-
os << "leaf::diagnostic_info:" << std::endl;
10491-
x.print(os);
10492-
if( x.e_uc_ )
10493-
x.e_uc_->print(os);
10490+
os << "leaf::diagnostic_info:";
10491+
if( x.err_id_ )
10492+
{
10493+
os << std::endl;
10494+
x.print(os);
10495+
if( x.e_uc_ )
10496+
x.e_uc_->print(os);
10497+
}
10498+
else
10499+
os << " {No Error}" << std::endl;
1049410500
return os;
1049510501
}
1049610502
};
@@ -10509,10 +10515,16 @@ namespace boost { namespace leaf {
1050910515

1051010516
friend std::ostream & operator<<( std::ostream & os, verbose_diagnostic_info const & x )
1051110517
{
10512-
os << "leaf::verbose_diagnostic_info:" << std::endl;
10513-
x.print(os);
10514-
if( x.e_ui_ )
10515-
x.e_ui_->print(os);
10518+
os << "leaf::verbose_diagnostic_info:";
10519+
if( x.err_id_ )
10520+
{
10521+
os << std::endl;
10522+
x.print(os);
10523+
if( x.e_ui_ )
10524+
x.e_ui_->print(os);
10525+
}
10526+
else
10527+
os << " {No Error}" << std::endl;
1051610528
return os;
1051710529
}
1051810530
};
@@ -16524,10 +16536,16 @@ namespace boost { namespace leaf {
1652416536

1652516537
friend std::ostream & operator<<( std::ostream & os, diagnostic_info const & x )
1652616538
{
16527-
os << "leaf::diagnostic_info:" << std::endl;
16528-
x.print(os);
16529-
if( x.e_uc_ )
16530-
x.e_uc_->print(os);
16539+
os << "leaf::diagnostic_info:";
16540+
if( x.err_id_ )
16541+
{
16542+
os << std::endl;
16543+
x.print(os);
16544+
if( x.e_uc_ )
16545+
x.e_uc_->print(os);
16546+
}
16547+
else
16548+
os << " {No Error}" << std::endl;
1653116549
return os;
1653216550
}
1653316551
};
@@ -16546,10 +16564,16 @@ namespace boost { namespace leaf {
1654616564

1654716565
friend std::ostream & operator<<( std::ostream & os, verbose_diagnostic_info const & x )
1654816566
{
16549-
os << "leaf::verbose_diagnostic_info:" << std::endl;
16550-
x.print(os);
16551-
if( x.e_ui_ )
16552-
x.e_ui_->print(os);
16567+
os << "leaf::verbose_diagnostic_info:";
16568+
if( x.err_id_ )
16569+
{
16570+
os << std::endl;
16571+
x.print(os);
16572+
if( x.e_ui_ )
16573+
x.e_ui_->print(os);
16574+
}
16575+
else
16576+
os << " {No Error}" << std::endl;
1655316577
return os;
1655416578
}
1655516579
};

include/boost/leaf/detail/handle.hpp

+20-8
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,16 @@ namespace boost { namespace leaf {
127127

128128
friend std::ostream & operator<<( std::ostream & os, diagnostic_info const & x )
129129
{
130-
os << "leaf::diagnostic_info:" << std::endl;
131-
x.print(os);
132-
if( x.e_uc_ )
133-
x.e_uc_->print(os);
130+
os << "leaf::diagnostic_info:";
131+
if( x.err_id_ )
132+
{
133+
os << std::endl;
134+
x.print(os);
135+
if( x.e_uc_ )
136+
x.e_uc_->print(os);
137+
}
138+
else
139+
os << " {No Error}" << std::endl;
134140
return os;
135141
}
136142
};
@@ -149,10 +155,16 @@ namespace boost { namespace leaf {
149155

150156
friend std::ostream & operator<<( std::ostream & os, verbose_diagnostic_info const & x )
151157
{
152-
os << "leaf::verbose_diagnostic_info:" << std::endl;
153-
x.print(os);
154-
if( x.e_ui_ )
155-
x.e_ui_->print(os);
158+
os << "leaf::verbose_diagnostic_info:";
159+
if( x.err_id_ )
160+
{
161+
os << std::endl;
162+
x.print(os);
163+
if( x.e_ui_ )
164+
x.e_ui_->print(os);
165+
}
166+
else
167+
os << " {No Error}" << std::endl;
156168
return os;
157169
}
158170
};

0 commit comments

Comments
 (0)