Package sonia.scm.repository.api
Class FileLockedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
sonia.scm.ExceptionWithContext
sonia.scm.repository.api.FileLockedException
- All Implemented Interfaces:
Serializable
Exception thrown whenever a locked file should be modified or locked/unlocked by a user that does not hold the lock.
- Since:
- 2.26.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class sonia.scm.ExceptionWithContext
ExceptionWithContext.AdditionalMessage
-
Constructor Summary
ConstructorsConstructorDescriptionFileLockedException
(NamespaceAndName namespaceAndName, FileLock lock) Creates the exception.FileLockedException
(NamespaceAndName namespaceAndName, FileLock lock, String additionalMessage) Creates the exception with an additional message. -
Method Summary
Methods inherited from class sonia.scm.ExceptionWithContext
getAdditionalMessages, getContext, getUrl
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
FileLockedException
Creates the exception.- Parameters:
namespaceAndName
- The namespace and name of the repository.lock
- The lock causing this exception.
-
FileLockedException
public FileLockedException(NamespaceAndName namespaceAndName, FileLock lock, String additionalMessage) Creates the exception with an additional message.- Parameters:
namespaceAndName
- The namespace and name of the repository.lock
- The lock causing this exception.additionalMessage
- An additional message that will be appended to the default message.
-
-
Method Details
-
getCode
- Specified by:
getCode
in classExceptionWithContext
-
getConflictingLock
The lock that caused this exception.
-