mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Improve exception info if XMLRPC parse fails.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22836 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4686a4a652
commit
e4915f06ce
2 changed files with 9 additions and 5 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
* Source/NSKeyedUnarchiver.m: Fix decoding of NSNull objects.
|
||||
* Source/Additions/GSXML.m: Ensure that calls to parse documents
|
||||
handle the success/failure value returned.
|
||||
handle the success/failure value returned. Improve exception info.
|
||||
|
||||
2006-04-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -4957,16 +4957,18 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
{
|
||||
GSXPathContext *ctx = nil;
|
||||
GSXPathNodeSet *ns = nil;
|
||||
GSXMLParser *parser = nil;
|
||||
NSString *method;
|
||||
|
||||
[params removeAllObjects];
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
GSXMLParser *parser = [GSXMLParser parserWithData: request];
|
||||
GSXMLDocument *doc = nil;
|
||||
|
||||
parser = [GSXMLParser parserWithData: request];
|
||||
[parser substituteEntities: YES];
|
||||
[parser saveMessages: YES];
|
||||
if ([parser parse] == YES)
|
||||
{
|
||||
doc = [parser document];
|
||||
|
@ -4981,7 +4983,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
if (ctx == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Bad Request: parse failed"];
|
||||
format: @"Bad Request: parse failed (%@)", [parser messages]];
|
||||
}
|
||||
|
||||
ns = (GSXPathNodeSet*)[ctx evaluateExpression: @"//methodCall/methodName"];
|
||||
|
@ -5030,16 +5032,18 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
{
|
||||
GSXPathContext *ctx = nil;
|
||||
GSXPathNodeSet *ns = nil;
|
||||
GSXMLParser *parser = nil;
|
||||
id fault = nil;
|
||||
|
||||
[params removeAllObjects];
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
GSXMLParser *parser = [GSXMLParser parserWithData: response];
|
||||
GSXMLDocument *doc = nil;
|
||||
|
||||
parser = [GSXMLParser parserWithData: response];
|
||||
[parser substituteEntities: YES];
|
||||
[parser saveMessages: YES];
|
||||
if ([parser parse] == YES)
|
||||
{
|
||||
doc = [parser document];
|
||||
|
@ -5054,7 +5058,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
if (ctx == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Bad Response: parse failed"];
|
||||
format: @"Bad Request: parse failed (%@)", [parser messages]];
|
||||
}
|
||||
|
||||
ns = (GSXPathNodeSet*)[ctx evaluateExpression:
|
||||
|
|
Loading…
Reference in a new issue