www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Usage of Exceptions in std.xml

reply "Rene Zwanenburg" <renezwanenburg gmail.com> writes:
I'm not sure, but it appears that std.xml uses exceptions for 
control flow. I use VisualD for development, and Visual Studio 
has been configured to break on exceptions. This means that every 
time a new DocumentParser is created with valid XML, the debugger 
explodes because of the thrown exceptions.

Am I doing something wrong, or shall I create a change request?
Apr 15 2012
next sibling parent reply "Jesse Phillips" <jessekphillips+D gmail.com> writes:
On Sunday, 15 April 2012 at 14:43:37 UTC, Rene Zwanenburg wrote:
 I'm not sure, but it appears that std.xml uses exceptions for 
 control flow. I use VisualD for development, and Visual Studio 
 has been configured to break on exceptions. This means that 
 every time a new DocumentParser is created with valid XML, the 
 debugger explodes because of the thrown exceptions.

 Am I doing something wrong, or shall I create a change request?

The std.xml module will be getting replaced. So I can't really recommend making a change request, if this is the case. Possible alternative: https://code.launchpad.net/d2-xml
Apr 15 2012
next sibling parent reply "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"Rene Zwanenburg" <renezwanenburg gmail.com> wrote in message 
news:qsfdbygjmisksxwmzlcd forum.dlang.org...
 Thanks. I've been trying to get D2-XML to compile for a few hours now 
 without much luck, so that one is out. Does anyone know another good 
 replacement?

The one in Tango is supposed to be pretty good (and *very* fast). Since Tango now works on D2 side-by-side with Phobos, that may be an option.
 Also, why replace std.xml? As far as I can tell it works fine, except for 
 the thrown exceptions.

A lot of people have had a lot of probelms with it (though I've never tried it myself).
Apr 16 2012
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2012-04-19 18:03, Rene Zwanenburg wrote:
 On Monday, 16 April 2012 at 20:59:11 UTC, Nick Sabalausky wrote:
 "Rene Zwanenburg" <renezwanenburg gmail.com> wrote in message
 news:qsfdbygjmisksxwmzlcd forum.dlang.org...
 Thanks. I've been trying to get D2-XML to compile for a few hours now
 without much luck, so that one is out. Does anyone know another good
 replacement?

The one in Tango is supposed to be pretty good (and *very* fast). Since Tango now works on D2 side-by-side with Phobos, that may be an option.
 Also, why replace std.xml? As far as I can tell it works fine, except
 for the thrown exceptions.

A lot of people have had a lot of probelms with it (though I've never tried it myself).

Tango doesn't work with the latest DMD. Thanks for the suggestion though, I think I'll take another look at it if it gets updated. For now I'll keep using std.xml. The application only reads xml files during initialization, so it's mostly a convenience issue.

I just cloned the repoistory and it, at least, compiles with DMD 2.059. https://github.com/SiegeLord/Tango-D2 -- /Jacob Carlborg
Apr 19 2012
prev sibling parent ponce <spam spam.org> writes:
 For now I'll keep using std.xml. The application only reads xml files
 during initialization, so it's mostly a convenience issue.

I had to do a quick-and-dirty tool in a limited time frame and using kxml was much easier than std.xml. http://opticron.no-ip.org/svn/branches/kxml/
Apr 19 2012
prev sibling parent Somedude <lovelydear mailmetrash.com> writes:
Le 16/04/2012 22:32, Rene Zwanenburg a écrit :
 On Sunday, 15 April 2012 at 15:31:52 UTC, Jesse Phillips wrote:
 Also, why replace std.xml? As far as I can tell it works fine, except
 for the thrown exceptions.

For performance reasons.
Apr 17 2012
prev sibling next sibling parent "Rene Zwanenburg" <renezwanenburg gmail.com> writes:
On Sunday, 15 April 2012 at 15:31:52 UTC, Jesse Phillips wrote:
 On Sunday, 15 April 2012 at 14:43:37 UTC, Rene Zwanenburg wrote:
 I'm not sure, but it appears that std.xml uses exceptions for 
 control flow. I use VisualD for development, and Visual Studio 
 has been configured to break on exceptions. This means that 
 every time a new DocumentParser is created with valid XML, the 
 debugger explodes because of the thrown exceptions.

 Am I doing something wrong, or shall I create a change request?

The std.xml module will be getting replaced. So I can't really recommend making a change request, if this is the case. Possible alternative: https://code.launchpad.net/d2-xml

Thanks. I've been trying to get D2-XML to compile for a few hours now without much luck, so that one is out. Does anyone know another good replacement? Also, why replace std.xml? As far as I can tell it works fine, except for the thrown exceptions.
Apr 16 2012
prev sibling parent "Rene Zwanenburg" <renezwanenburg gmail.com> writes:
On Monday, 16 April 2012 at 20:59:11 UTC, Nick Sabalausky wrote:
 "Rene Zwanenburg" <renezwanenburg gmail.com> wrote in message
 news:qsfdbygjmisksxwmzlcd forum.dlang.org...
 Thanks. I've been trying to get D2-XML to compile for a few 
 hours now without much luck, so that one is out. Does anyone 
 know another good replacement?

The one in Tango is supposed to be pretty good (and *very* fast). Since Tango now works on D2 side-by-side with Phobos, that may be an option.
 Also, why replace std.xml? As far as I can tell it works fine, 
 except for the thrown exceptions.

A lot of people have had a lot of probelms with it (though I've never tried it myself).

Tango doesn't work with the latest DMD. Thanks for the suggestion though, I think I'll take another look at it if it gets updated. For now I'll keep using std.xml. The application only reads xml files during initialization, so it's mostly a convenience issue.
Apr 19 2012