How to 'try' and 'catch' a warning ?



If there is a potential error, I can use try-catch.
But what if I want to do special handling in case of warnings? Any
alternatives?
Thanks!

.



Relevant Pages

  • Re: Detect illconditioned backslash () solution
    ... I assume the best way to avoid the warnings to the workspace is a try-catch. ... the a matrix becomes singular. ... You could set the warning state to empty before the backslash and then ...
    (comp.soft-sys.matlab)
  • How to catch all exceptions?
    ... contents from presenting the potential error ... especially a general, top level try-catch. ... catch (Exception exception){ ...
    (microsoft.public.dotnet.languages.csharp)
  • [PATCH 15/27] cpufreq: fix section mismatch warnings
    ... The warnings were casued by references to unregister_hotcpu_notifier ... from normal functions or exit functions. ... This is flagged by modpost as a potential error because ... annotation with a __refdata annotation. ...
    (Linux-Kernel)
  • Re: handling warnings, php5?
    ... I need to handle warnings in incorrect regular expressions executed ... I tried using try-catch but warnings are not caught. ... Then check for the returned value by the regex function and use ...
    (comp.lang.php)

Loading