mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-14 00:51:19 +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:
parent
4d9bd6f216
commit
bc093b620d
29 changed files with 63 additions and 156 deletions
|
|
@ -16,9 +16,6 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.search;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
|
|
@ -32,7 +29,6 @@ import org.jivesoftware.smackx.xdata.FormField;
|
|||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
import org.jxmpp.jid.DomainBareJid;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
/**
|
||||
* Implements the protocol currently used to search information repositories on the Jabber network. To date, the jabber:iq:search protocol
|
||||
|
|
@ -127,7 +123,7 @@ public class UserSearch extends SimpleIQ {
|
|||
|
||||
// FIXME this provider does return two different types of IQs
|
||||
@Override
|
||||
public IQ parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackException {
|
||||
public IQ parse(XmlPullParser parser, int initialDepth) throws Exception {
|
||||
UserSearch search = null;
|
||||
SimpleUserSearch simpleUserSearch = new SimpleUserSearch();
|
||||
|
||||
|
|
@ -163,7 +159,7 @@ public class UserSearch extends SimpleIQ {
|
|||
|
||||
private static void buildDataForm(SimpleUserSearch search,
|
||||
String instructions, XmlPullParser parser)
|
||||
throws XmlPullParserException, IOException, SmackException {
|
||||
throws Exception {
|
||||
DataForm dataForm = new DataForm(DataForm.Type.form);
|
||||
boolean done = false;
|
||||
dataForm.setTitle("User Search");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue