View mode: basic / threaded / horizontal-split · Log in · Help
April 15, 2012
Usage of Exceptions in std.xml
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?
April 15, 2012
Re: Usage of Exceptions in std.xml
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
April 16, 2012
Re: Usage of Exceptions in std.xml
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.
April 16, 2012
Re: Usage of Exceptions in std.xml
"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).
April 17, 2012
Re: Usage of Exceptions in std.xml
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.
April 19, 2012
Re: Usage of Exceptions in std.xml
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.
April 19, 2012
Re: Usage of Exceptions in std.xml
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
April 19, 2012
Re: Usage of Exceptions in std.xml
> 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/
Top | Discussion index | About this forum | D home