@@ -509,7 +509,7 @@ struct SysFlow {
509
509
inline
510
510
std::string _SysFlow_avsc_Union__0__::get_string () const {
511
511
if (idx_ != 1 ) {
512
- throw avro::Exception (" Invalid type for union" );
512
+ throw avro::Exception (std::string ( " Invalid type for union. Expected string index, got index " ) + std::to_string (idx_) );
513
513
}
514
514
return boost::any_cast<std::string >(value_);
515
515
}
@@ -523,7 +523,7 @@ void _SysFlow_avsc_Union__0__::set_string(const std::string& v) {
523
523
inline
524
524
OID _SysFlow_avsc_Union__1__::get_OID () const {
525
525
if (idx_ != 1 ) {
526
- throw avro::Exception (" Invalid type for union" );
526
+ throw avro::Exception (std::string ( " Invalid type for union. Expected OID index, got index " ) + std::to_string (idx_) );
527
527
}
528
528
return boost::any_cast<OID >(value_);
529
529
}
@@ -537,7 +537,7 @@ void _SysFlow_avsc_Union__1__::set_OID(const OID& v) {
537
537
inline
538
538
std::string _SysFlow_avsc_Union__2__::get_string () const {
539
539
if (idx_ != 1 ) {
540
- throw avro::Exception (" Invalid type for union" );
540
+ throw avro::Exception (std::string ( " Invalid type for union. Expected string index, got index " ) + std::to_string (idx_) );
541
541
}
542
542
return boost::any_cast<std::string >(value_);
543
543
}
@@ -551,7 +551,7 @@ void _SysFlow_avsc_Union__2__::set_string(const std::string& v) {
551
551
inline
552
552
std::string _SysFlow_avsc_Union__3__::get_string () const {
553
553
if (idx_ != 1 ) {
554
- throw avro::Exception (" Invalid type for union" );
554
+ throw avro::Exception (std::string ( " Invalid type for union. Expected string index, got index " ) + std::to_string (idx_) );
555
555
}
556
556
return boost::any_cast<std::string >(value_);
557
557
}
@@ -565,7 +565,7 @@ void _SysFlow_avsc_Union__3__::set_string(const std::string& v) {
565
565
inline
566
566
std::array<uint8_t , 20 > _SysFlow_avsc_Union__4__::get_FOID () const {
567
567
if (idx_ != 1 ) {
568
- throw avro::Exception (" Invalid type for union" );
568
+ throw avro::Exception (std::string ( " Invalid type for union. Expected FOID index, got index " ) + std::to_string (idx_) );
569
569
}
570
570
return boost::any_cast<std::array<uint8_t , 20 > >(value_);
571
571
}
@@ -579,7 +579,7 @@ void _SysFlow_avsc_Union__4__::set_FOID(const std::array<uint8_t, 20>& v) {
579
579
inline
580
580
SFHeader _SysFlow_avsc_Union__5__::get_SFHeader () const {
581
581
if (idx_ != 0 ) {
582
- throw avro::Exception (" Invalid type for union" );
582
+ throw avro::Exception (std::string ( " Invalid type for union. Expected header index, got index " ) + std::to_string (idx_) );
583
583
}
584
584
return boost::any_cast<SFHeader >(value_);
585
585
}
@@ -593,7 +593,7 @@ void _SysFlow_avsc_Union__5__::set_SFHeader(const SFHeader& v) {
593
593
inline
594
594
Container _SysFlow_avsc_Union__5__::get_Container () const {
595
595
if (idx_ != 1 ) {
596
- throw avro::Exception (" Invalid type for union" );
596
+ throw avro::Exception (std::string ( " Invalid type for union. Expected container index, got index " ) + std::to_string (idx_) );
597
597
}
598
598
return boost::any_cast<Container >(value_);
599
599
}
@@ -607,7 +607,7 @@ void _SysFlow_avsc_Union__5__::set_Container(const Container& v) {
607
607
inline
608
608
Process _SysFlow_avsc_Union__5__::get_Process () const {
609
609
if (idx_ != 2 ) {
610
- throw avro::Exception (" Invalid type for union" );
610
+ throw avro::Exception (std::string ( " Invalid type for union. Expected process index, got index " ) + std::to_string (idx_) );
611
611
}
612
612
return boost::any_cast<Process >(value_);
613
613
}
@@ -621,7 +621,7 @@ void _SysFlow_avsc_Union__5__::set_Process(const Process& v) {
621
621
inline
622
622
File _SysFlow_avsc_Union__5__::get_File () const {
623
623
if (idx_ != 3 ) {
624
- throw avro::Exception (" Invalid type for union" );
624
+ throw avro::Exception (std::string ( " Invalid type for union. Expected file index, got index " ) + std::to_string (idx_) );
625
625
}
626
626
return boost::any_cast<File >(value_);
627
627
}
@@ -635,7 +635,7 @@ void _SysFlow_avsc_Union__5__::set_File(const File& v) {
635
635
inline
636
636
ProcessEvent _SysFlow_avsc_Union__5__::get_ProcessEvent () const {
637
637
if (idx_ != 4 ) {
638
- throw avro::Exception (" Invalid type for union" );
638
+ throw avro::Exception (std::string ( " Invalid type for union. Expected PE index, got index " ) + std::to_string (idx_) );
639
639
}
640
640
return boost::any_cast<ProcessEvent >(value_);
641
641
}
@@ -649,7 +649,7 @@ void _SysFlow_avsc_Union__5__::set_ProcessEvent(const ProcessEvent& v) {
649
649
inline
650
650
NetworkFlow _SysFlow_avsc_Union__5__::get_NetworkFlow () const {
651
651
if (idx_ != 5 ) {
652
- throw avro::Exception (" Invalid type for union" );
652
+ throw avro::Exception (std::string ( " Invalid type for union. Expected NF index, got index " ) + std::to_string (idx_) );
653
653
}
654
654
return boost::any_cast<NetworkFlow >(value_);
655
655
}
@@ -663,7 +663,7 @@ void _SysFlow_avsc_Union__5__::set_NetworkFlow(const NetworkFlow& v) {
663
663
inline
664
664
FileFlow _SysFlow_avsc_Union__5__::get_FileFlow () const {
665
665
if (idx_ != 6 ) {
666
- throw avro::Exception (" Invalid type for union" );
666
+ throw avro::Exception (std::string ( " Invalid type for union. Expected FF index, got index " ) + std::to_string (idx_) );
667
667
}
668
668
return boost::any_cast<FileFlow >(value_);
669
669
}
@@ -677,7 +677,7 @@ void _SysFlow_avsc_Union__5__::set_FileFlow(const FileFlow& v) {
677
677
inline
678
678
FileEvent _SysFlow_avsc_Union__5__::get_FileEvent () const {
679
679
if (idx_ != 7 ) {
680
- throw avro::Exception (" Invalid type for union" );
680
+ throw avro::Exception (std::string ( " Invalid type for union. Expected FE index, got index " ) + std::to_string (idx_) );
681
681
}
682
682
return boost::any_cast<FileEvent >(value_);
683
683
}
@@ -691,7 +691,7 @@ void _SysFlow_avsc_Union__5__::set_FileEvent(const FileEvent& v) {
691
691
inline
692
692
NetworkEvent _SysFlow_avsc_Union__5__::get_NetworkEvent () const {
693
693
if (idx_ != 8 ) {
694
- throw avro::Exception (" Invalid type for union" );
694
+ throw avro::Exception (std::string ( " Invalid type for union. Expected NE index, got index " ) + std::to_string (idx_) );
695
695
}
696
696
return boost::any_cast<NetworkEvent >(value_);
697
697
}
@@ -705,7 +705,7 @@ void _SysFlow_avsc_Union__5__::set_NetworkEvent(const NetworkEvent& v) {
705
705
inline
706
706
ProcessFlow _SysFlow_avsc_Union__5__::get_ProcessFlow () const {
707
707
if (idx_ != 9 ) {
708
- throw avro::Exception (" Invalid type for union" );
708
+ throw avro::Exception (std::string ( " Invalid type for union. Expected PF index, got index " ) + std::to_string (idx_) );
709
709
}
710
710
return boost::any_cast<ProcessFlow >(value_);
711
711
}
@@ -719,7 +719,7 @@ void _SysFlow_avsc_Union__5__::set_ProcessFlow(const ProcessFlow& v) {
719
719
inline
720
720
Pod _SysFlow_avsc_Union__5__::get_Pod () const {
721
721
if (idx_ != 10 ) {
722
- throw avro::Exception (" Invalid type for union" );
722
+ throw avro::Exception (std::string ( " Invalid type for union. Expected pod index, got index " ) + std::to_string (idx_) );
723
723
}
724
724
return boost::any_cast<Pod >(value_);
725
725
}
@@ -733,7 +733,7 @@ void _SysFlow_avsc_Union__5__::set_Pod(const Pod& v) {
733
733
inline
734
734
K8sEvent _SysFlow_avsc_Union__5__::get_K8sEvent () const {
735
735
if (idx_ != 11 ) {
736
- throw avro::Exception (" Invalid type for union" );
736
+ throw avro::Exception (std::string ( " Invalid type for union. Expected KE index, got index " ) + std::to_string (idx_) );
737
737
}
738
738
return boost::any_cast<K8sEvent >(value_);
739
739
}
0 commit comments