1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-11 23:51:09 +01:00

Make Provider.parse() just throw Exception

instead of throwing XmlPullParserException, IOException and
SmackException.

Add a guard to AbstractXMPPConnection.processPacket() to always re-throw
RuntimeExceptions.
This commit is contained in:
Florian Schmaus 2015-03-13 09:27:18 +01:00
parent 4d9bd6f216
commit bc093b620d
29 changed files with 63 additions and 156 deletions

View file

@ -16,8 +16,6 @@
*/
package org.jivesoftware.smackx.carbons.provider;
import java.io.IOException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smackx.carbons.packet.CarbonExtension;
@ -25,7 +23,6 @@ import org.jivesoftware.smackx.carbons.packet.CarbonExtension.Direction;
import org.jivesoftware.smackx.forward.packet.Forwarded;
import org.jivesoftware.smackx.forward.provider.ForwardedProvider;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
* This class implements the {@link ExtensionElementProvider} to parse
@ -40,7 +37,7 @@ public class CarbonManagerProvider extends ExtensionElementProvider<CarbonExtens
@Override
public CarbonExtension parse(XmlPullParser parser, int initialDepth)
throws SmackException, XmlPullParserException, IOException {
throws Exception {
Direction dir = Direction.valueOf(parser.getName());
Forwarded fwd = null;