blob: d161eff24f6ba9ae1e021c673707dd832c7ad505 [file] [log] [blame]
---
title: Exceptions and System Failures
---
<!--
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.
-->
Your application needs to catch certain classes to handle all the exceptions and system failures thrown by <%=vars.product_name_long%>.
- `GemFireCheckedException`. This class is the abstract superclass of exceptions that are thrown and declared. Wherever possible, GemFire exceptions are checked exceptions. `GemFireCheckedException` is a <%=vars.product_name%> version of `java.lang.Exception`.
- `GemFireException`. This class is the abstract superclass of unchecked exceptions that are thrown to indicate conditions for which the developer should not normally need to check. You can look at the subclasses of `GemFireException` to see all the runtime exceptions in the GemFire system; see the class hierarchy in the online Java API documentation. `GemFireException` is a <%=vars.product_name%> version of java.lang.`RuntimeException`. You can also look at the method details in the `Region` API javadocs for <%=vars.product_name%> exceptions you may want to catch.
- `SystemFailure`. In addition to exception management, <%=vars.product_name%> provides a class to help you manage catastrophic failure in your cluster, particularly in your application. The Javadocs for this class provide extensive guidance for managing failures in your system and your application. See `SystemFailure` in the `org.apache.geode` package.
To see the exceptions thrown by a specific method, refer to the method's online Java documentation.
A <%=vars.product_name%> system member can also throw exceptions generated by third-party software such as JGroups or `java.lang` classes. For assistance in handling these exceptions, see the vendor documentation.