New little features in Descent
Ary Borenszweig
ary at esperanto.org.ar
Wed Aug 26 10:34:51 PDT 2009
Charles Hixson wrote:
> Ary Borenszweig wrote:
>> Qian Xu wrote:
>>> Hi Ary,
>>>
>>> well done.
>>>
>>> Here is a small bug report about the code fomatter:
>>>
>>>
>>> =============================
>>> import tango.io.Stdout;
>>> import tango.core.Exception;
>>>
>>> void main(char[][] args)
>>> {
>>> try
>>> {
>>> /* Do some stuff */
>>> }
>>> catch (IOException ex)
>>> {
>>> Stdout.formatln("Caught IOException!");
>>> /* Consequence: Clean up and possibly try again. */
>>> } catch (Exception ex)
>>> {
>>> Stdout.formatln("Caught unexpected exception!");
>>> /* Consequence: Die as gracefully as possible. */
>>> }
>>> }
>>> =============================
>>>
>>> You can see, the first catch-block is placed from a new line, but the
>>> second
>>> catch-block is not. Could you please fix this issue?
>>>
>>> Thanks in advance.
>>
>> The result I get, with brackets of try/catch/finally configured to the
>> next line, is:
>>
>> import tango.io.Stdout;
>> import tango.core.Exception;
>>
>> void main(char[][] args) {
>> try
>> {
>> /* Do some stuff */
>> } catch(IOException ex)
>> {
>> Stdout.formatln("Caught IOException!");
>> /* Consequence: Clean up and possibly try again. */
>> } catch(Exception ex)
>> {
>> Stdout.formatln("Caught unexpected exception!");
>> /* Consequence: Die as gracefully as possible. */
>> }
>> }
>>
>> What's your formatter configuration?
> Did you notice the line in your example reading:
> /* Consequence: Clean up and possibly try again. */
> } catch(Exception ex)
> I think he's saying the catch should have been on a line separate from
> the close bracket.
> (I've noticed that I need to do a lot of formatting manually with things
> like:
> if (....)
> {
> {
> being common. I just insert another tab, so it's no big deal, but it
> happens frequently. (I'd rather that you detected more parsing errors
> rather than spending your time fixing the formatting, but other people
> have other priorities.)
> P.S.: When using descent I've discovered that it's best to avoid emuns.
> It would be nice if that were fixed. Using them seems to lead to the
> entire IDE freezing.
If you can create a ticket so I can reproduce it, great. :)
More information about the Digitalmars-d-announce
mailing list