gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_fi


From: Richard Wilbur
Subject: Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-1925-g1499541
Date: Thu, 24 Apr 2014 21:14:55 -0600

On Thu, Apr 24, 2014 at 3:27 AM, Petter Reinholdtsen <address@hidden> wrote:
[...]
> commit 14995412c24adccd4577f1c3d12961c38eac86a4
> Author: Petter Reinholdtsen <address@hidden>
> Date:   Thu Apr 24 11:26:10 2014 +0200
>
>     Add code to handle exceptions in test code.  Should address several 
> Coverity CID reports.
>     Introduces a new macro TRYMAIN() to handle the exceptions.
>
> diff --git a/testsuite/check.h b/testsuite/check.h
> index 81698db..c6c987c 100644
> --- a/testsuite/check.h
> +++ b/testsuite/check.h
> @@ -117,4 +117,15 @@ TestState _runtest;
>                 } \
>         }
>
> +int trymain(int argc, char *argv[]);
> +#define TRYMAIN(runtest) \
> +int main(int argc, char *argv[]) { \
> +  try { \
> +      return trymain(argc, argv);  \
> +  } catch (std::exception const&  ex) { \
> +    (runtest).fail(std::string("caugh unexcepcted exception: ") + 
> ex.what()); \
> +    return 1; \
> +  } \
> +}
> +
>  #endif // _CHECK_H_

Great idea, good implementation, bad spelling:
> +    (runtest).fail(std::string("caugh unexcepcted exception: ") + 
> ex.what()); \

s/caugh unexcepcted/caught unexpected/



reply via email to

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