gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Nit


From: Robin Farine
Subject: Re: [Gnu-arch-users] Nit
Date: 22 Oct 2003 03:11:47 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Me" == Robin Farine <address@hidden> writes:

Bugs attack! Second _try_ in the hope I _caught_ them all this time:

    Me>         attempts = 0;
    Me>         while (attempts++ < NO_MORE_PLEASE) {
    Me>           user = prompt_for_user_name();
    Me>           try {
    Me>             retries = 0;
    Me>             while (retries++ < MAX_RETRIES) {
    Me>               try {
    Me>                 cfg = B_fn(user);
                        break;
    Me>               } catch (OutOfSystemMemory e) {
    Me>                 allocator_cache.release_some_memory();
    Me>               }
    Me>             }
    Me>             if (cfg)
    Me>               break;
                    else if (retries > MAX_RETRIES)
                      abort("no memory");
    Me>             else
    Me>               message("bad user ...");
    Me>           } catch (Configuration::ParseError e) {
    Me>             parse_error(e); /* format error message and output to 
stderr */
    Me>             abort();
    Me>           } catch (Logging::DestinationUnreachable e) {
    Me>             logging_error(e); /* format error message and output to 
stderr */
    Me>             abort(); /* or maybe ignore it */
    Me>           }
    Me>         }

-- 
rnf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]