blob: f3dae55514c0e440129e00786711c243a0fcff4e [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>LocalizedException (Apache SIS 1.3 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.sis.util, interface: LocalizedException">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.util.LocalizedException interface">
<meta name="keywords" content="getMessage()">
<meta name="keywords" content="getLocalizedMessage()">
<meta name="keywords" content="getInternationalMessage()">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/LocalizedException.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.util</a></div>
<h1 title="Interface LocalizedException" class="title">Interface LocalizedException</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../storage/CanNotProbeException.html" title="class in org.apache.sis.storage">Can­Not­Probe­Exception</a></code>, <code><a href="../storage/ConcurrentReadException.html" title="class in org.apache.sis.storage">Concurrent­Read­Exception</a></code>, <code><a href="../storage/ConcurrentWriteException.html" title="class in org.apache.sis.storage">Concurrent­Write­Exception</a></code>, <code><a href="../storage/DataStoreClosedException.html" title="class in org.apache.sis.storage">Data­Store­Closed­Exception</a></code>, <code><a href="../storage/DataStoreContentException.html" title="class in org.apache.sis.storage">Data­Store­Content­Exception</a></code>, <code><a href="../storage/DataStoreException.html" title="class in org.apache.sis.storage">Data­Store­Exception</a></code>, <code><a href="../storage/DataStoreReferencingException.html" title="class in org.apache.sis.storage">Data­Store­Referencing­Exception</a></code>, <code><a href="../storage/ForwardOnlyStorageException.html" title="class in org.apache.sis.storage">Forward­Only­Storage­Exception</a></code>, <code><a href="../storage/IllegalFeatureTypeException.html" title="class in org.apache.sis.storage">Illegal­Feature­Type­Exception</a></code>, <code><a href="../storage/IllegalNameException.html" title="class in org.apache.sis.storage">Illegal­Name­Exception</a></code>, <code><a href="../storage/IllegalOpenParameterException.html" title="class in org.apache.sis.storage">Illegal­Open­Parameter­Exception</a></code>, <code><a href="../storage/IncompatibleResourceException.html" title="class in org.apache.sis.storage">Incompatible­Resource­Exception</a></code>, <code><a href="../storage/InternalDataStoreException.html" title="class in org.apache.sis.storage">Internal­Data­Store­Exception</a></code>, <code><a href="../storage/NoSuchDataException.html" title="class in org.apache.sis.storage">No­Such­Data­Exception</a></code>, <code><a href="../storage/ReadOnlyStorageException.html" title="class in org.apache.sis.storage">Read­Only­Storage­Exception</a></code>, <code><a href="../storage/ResourceAlreadyExistsException.html" title="class in org.apache.sis.storage">Resource­Already­Exists­Exception</a></code>, <code><a href="../io/wkt/UnparsableObjectException.html" title="class in org.apache.sis.io.wkt">Unparsable­Object­Exception</a></code>, <code><a href="../storage/UnsupportedEncodingException.html" title="class in org.apache.sis.storage">Unsupported­Encoding­Exception</a></code>, <code><a href="../storage/UnsupportedQueryException.html" title="class in org.apache.sis.storage">Unsupported­Query­Exception</a></code>, <code><a href="../storage/UnsupportedStorageException.html" title="class in org.apache.sis.storage">Unsupported­Storage­Exception</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">LocalizedException</span></div>
<div class="block">An exception which can produce an error message in the client locale.
Exceptions implementing this interface apply the following policy:
<ul>
<li><a href="#getMessage()"><code>get­Message()</code></a> returns the message in the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html#getDefault()" title="class or interface in java.util" class="external-link">default locale</a>.
In a client-server architecture, this is often the locale on the server side.</li>
<li><a href="#getLocalizedMessage()"><code>get­Localized­Message()</code></a> returns the message in a locale that depends on the context
in which the exception has been thrown. This is often the locale used by a <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link"><code>Format</code></a>
or <a href="../storage/DataStore.html" title="class in org.apache.sis.storage"><code>Data­Store</code></a> instance,
and can be presumed to be the locale on the client side.</li>
<li><a href="#getInternationalMessage()"><code>get­International­Message()</code></a> may return the message in arbitrary locale (optional operation).
This method is specific to Apache SIS.</li>
</ul>
<div class="note"><b>Example:</b>
if an error occurred while a Japanese client connected to an European server, the localized message may be sent
to the client in Japanese language while the same error may be logged on the server side in the French language.
This allows system administrator to analyze the issue without the need to understand client's language.</div>
The above policy is applied on a <em>best-effort</em> basis only. For example, exceptions that
do not implement <code>Localized­Exception</code> may use any locale (not necessarily the default one),
and <code>Localized­Exception</code> used as <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Exception.html#%3Cinit%3E(java.lang.Throwable)" title="class or interface in java.lang" class="external-link">wrappers</a> around
other exception usually lost their localization capability.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.8</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="Exceptions.html#getLocalizedMessage(java.lang.Throwable,java.util.Locale)"><code>Exceptions​.get­Localized­Message(Throwable, Locale)</code></a></li>
<li><a href="../storage/DataStore.html#setLocale(java.util.Locale)"><code>Data­Store​.set­Locale(Locale)</code></a></li>
</ul>
</dd>
<p><font size="-1">Defined in the <code>sis-utility</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">International­String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getInternationalMessage()" class="member-name-link">get­International­Message</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">If this exception is capable to return the message in various locales, returns that message.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getLocalizedMessage()" class="member-name-link">get­Localized­Message</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the message in the locale that depends on the context in which this exception has been thrown.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getMessage()" class="member-name-link">get­Message</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns the message in the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html#getDefault()" title="class or interface in java.util" class="external-link">default locale</a>.</div>
</div>
</div>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getMessage()">
<h3>getMessage</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getMessage</span>()</div>
<div class="block">Returns the message in the <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html#getDefault()" title="class or interface in java.util" class="external-link">default locale</a>.
In a client-server architecture, this is usually the locale on the server side.
This is the recommended language for logging messages to be read by system administrators.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the exception message in the JVM <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/Locale.html#getDefault()" title="class or interface in java.util" class="external-link">default locale</a>.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getLocalizedMessage()">
<h3>getLocalizedMessage</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getLocalizedMessage</span>()</div>
<div class="block">Returns the message in the locale that depends on the context in which this exception has been thrown.
For example, it may be the local of a client application connected to a distant server.
This is the recommended language to show in widgets.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the exception message in the locale of a service configured for a particular client.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getInternationalMessage()">
<h3>getInternationalMessage</h3>
<div class="member-signature"><span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link">InternationalString</a></span>&nbsp;<span class="element-name">getInternationalMessage</span>()</div>
<div class="block">If this exception is capable to return the message in various locales, returns that message.
Otherwise returns <code>null</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the exception message, or <code>null</code> if this exception cannot produce international message.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>