iq: Remove a panic!

Emmanuel Gil Peyrot created

Change summary

src/iq.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

src/iq.rs 🔗

@@ -145,7 +145,7 @@ impl<'a> TryFrom<&'a Element> for Iq {
                 return Err(Error::ParseError("Wrong number of children in iq element."));
             }
         } else {
-            panic!()
+            return Err(Error::ParseError("Unknown iq type."));
         };
 
         Ok(Iq {