#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# __str__ methods defined for subclasses of IndexError should be defined
# for the server implementations. If the client needs different messages
# displayed, catch the exception on the client side and display a custom
# message.
"""The base class for all exceptions that can occur while indexing."""
"""This is used when the existing index is found to have inconsistent
versions."""
return "Index corrupted, remove all files and " \
"rebuild from scratch by clearing out {0} " \
"""This is used when an attempt to modify an index locked by another
thread or process is made."""
# Used even if hostname is undefined.
return _("The search index cannot be modified as it "
"is currently in use by another process: "
"pid {pid} on {host}.").format(
return _("The search index cannot be modified as it is "
"currently in use by another process.")
"""This is used when the indexer is unable to create, move, or remove
files or directories it should be able to."""
return "Could not remove or create " \
"{0} because of\nincorrect " \
"permissions. Please correct this issue then " \
"""This is used when a search is executed while no index exists."""
return "Could not find index to search, looked in: " \
"""This is used when the index hash value doesn't match the hash of the
packages installed in the image."""
return "existing_val was:{0}\nincoming_val was:{1}".format(