blob: 076103907da12962daebc9793762cc376f5485e1 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--><mediawiki xmlns="http://www.mediawiki.org/xml/export-0.3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.3" xml:lang="en" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.3/ http://www.mediawiki.org/xml/export-0.3.xsd">
<siteinfo>
<sitename>NetBeans Wiki</sitename>
<base>http://wiki.netbeans.org/Main_Page</base>
<generator>MediaWiki 1.15.1</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2">Media</namespace>
<namespace key="-1">Special</namespace>
<namespace key="0"/>
<namespace key="1">Talk</namespace>
<namespace key="2">User</namespace>
<namespace key="3">User talk</namespace>
<namespace key="4">NetBeans Wiki</namespace>
<namespace key="5">NetBeans Wiki talk</namespace>
<namespace key="6">File</namespace>
<namespace key="7">File talk</namespace>
<namespace key="8">MediaWiki</namespace>
<namespace key="9">MediaWiki talk</namespace>
<namespace key="10">Template</namespace>
<namespace key="11">Template talk</namespace>
<namespace key="12">Help</namespace>
<namespace key="13">Help talk</namespace>
<namespace key="14">Category</namespace>
<namespace key="15">Category talk</namespace>
</namespaces>
</siteinfo>
<page>
<title>DevFaqUnexpectedExceptionDialog</title>
<id>7501</id>
<revision>
<id>46994</id>
<timestamp>2011-08-29T14:59:19Z</timestamp>
<contributor>
<username>Jglick</username>
<id>628</id>
</contributor>
<comment>Clarify the difference between the properties.</comment>
<text xml:space="preserve">__NOTOC__
===How can I suppress the Unexpected Exception dialog?===
If your code generates an uncaught exception at runtime or uses &lt;tt&gt;Logger.log(Level l, String s, Throwable t)&lt;/tt&gt; with level =&gt; 900 (&lt;tt&gt;Level.WARNING&lt;/tt&gt;), NetBeans will display a dialog box which can show the details of that exception to the user.
This is a welcome alternative to simply crashing the application,
and provided you have written solid code,
your user should never see this dialog anyway.
But it is impossible to handle every possible exception or error,
and some developers might wish to simply suppress this dialog
so that the application neither crashes nor alerts the user that an uncaught exception/error was thrown.
You can do this by [[DevFaqPlatformRuntimeProperties|setting a system property at runtime]]
named &lt;tt&gt;netbeans.exception.report.min.level&lt;/tt&gt;.
The exact value of this property will depend on certain factors such as whether or not assertions are enabled,
but using a very high value such as &lt;tt&gt;99999&lt;/tt&gt; should prevent the dialog from ever being shown automatically.
The above on its own doesn't suppress the exception dialog entirely - the dialog will still be shown if the user clicks on the error icon. To suppress that too, set &lt;tt&gt;netbeans.exception.alert.min.level&lt;/tt&gt; to a high value as well (i.e. &lt;tt&gt;99999&lt;/tt&gt;). This means your users will not even know there was a problem, and will have no opportunity to find out (or report it) unless they scan their log file.
See http://forums.netbeans.org/ptopic16746.html for details on how to set properties within NetBeans and in final applications.</text>
</revision>
</page>
</mediawiki>