Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

XML_Serilaizer - Problem with PEAR::setErrorHandling
Hi,
i use the function to intercept PEAR::setErrorHandling around
appearing mistakes and to evaluate.
This leads by the using XML_Serilaizer to problems.

If i give the Serilaizer a multi one dimensional array hand
over my program is broken off by a an "error" while testing,
within the class XML_Serilaizer, with the function
XML_Util::isValidName.

Would it be better to produce on these places no error object?
Is this a problem on mine or on the side of the class?

Kind Regards
Georg

Report this thread to moderator Post Follow-up to this message
Old Post
Georg Bez
11-25-04 08:56 PM


Re: XML_Serilaizer - Problem with PEAR::setErrorHandling
Georg Bez wrote:
> Hi,
> i use the function to intercept PEAR::setErrorHandling around
> appearing mistakes and to evaluate.
> This leads by the using XML_Serilaizer to problems.
>
> If i give the Serilaizer a multi one dimensional array hand
> over my program is broken off by a an "error" while testing,
> within the class XML_Serilaizer, with the function
> XML_Util::isValidName.
>
> Would it be better to produce on these places no error object?
> Is this a problem on mine or on the side of the class?

I have already send stefan a patch for this.
Essentially what is missing are expectError()/popExpect() calls around
the method call.

RCS file: /repository/pear/XML_Serializer/Serializer.php,v
retrieving revision 1.26
diff -u -r1.26 Serializer.php
--- Serializer.php	6 Nov 2004 15:49:52 -0000	1.26
+++ Serializer.php	25 Nov 2004 13:19:20 -0000
@@ -430,7 +430,9 @@
//	copy key
$origKey	=	$key;
//	key cannot be used as tagname => use default tag
+                $this->expectError(array(.. lots of error codes that
XML_Util::isValidName may throw));
$valid = XML_Util::isValidName($key);
+                $this->popExpect();
if (PEAR::isError($valid)) {
if ($this->options['classAsTagName'] &&
is_object($value)) {
$key = get_class($value);

regards,
Lukas

Report this thread to moderator Post Follow-up to this message
Old Post
Lukas Smith
11-25-04 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:52 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.