Class ObjectDoesNotExistException
- Namespace
- Quartz
- Assembly
- Quartz.dll
An exception that is thrown to indicate that an attempt to store an object failed because it names another object the store does not hold — a trigger whose Continuation waits for a trigger that does not exist.
public sealed class ObjectDoesNotExistException : JobPersistenceException, ISerializable
- Inheritance
-
ObjectDoesNotExistException
- Implements
- Inherited Members
Remarks
The counterpart of ObjectAlreadyExistsException, and a JobPersistenceException for the same reason that one is: the store refused the write, so nothing of it was stored.
A continuation of a trigger that does not exist would wait for a firing that can never happen — a parent whose name is misspelled, or a one-shot parent that has already fired and been deleted — and a trigger that waits for ever is one nobody notices. So the store says so when the trigger is stored, rather than holding it in Awaiting with nothing to release it.
Constructors
ObjectDoesNotExistException(ITrigger, TriggerKey)
Creates the exception for a trigger that could not be stored because the trigger it continues after does not exist, naming both.
public ObjectDoesNotExistException(ITrigger offendingTrigger, TriggerKey missingTrigger)
Parameters
offendingTriggerITriggerThe trigger that could not be stored.
missingTriggerTriggerKeyThe trigger it waits for, which the store does not hold.
ObjectDoesNotExistException(string)
Creates the exception with the given message. TriggerKey and MissingTriggerKey are both null: nothing here says which objects were involved.
public ObjectDoesNotExistException(string message)
Parameters
messagestringWhat was refused, and why.
Properties
MissingTriggerKey
The trigger it named that the store does not hold, when the exception was raised for one; otherwise null. It saves a caller parsing the key back out of Message.
public TriggerKey? MissingTriggerKey { get; }
Property Value
TriggerKey
The trigger that could not be stored, when the exception was raised for one; otherwise null.
public TriggerKey? TriggerKey { get; }