Class: Chef::Exceptions

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/exceptions.rb

Overview

Chef::Exceptions

Chef’s custom exceptions are all contained within the Chef::Exceptions namespace.

Defined Under Namespace

Classes: AmbiguousProviderResolution, AmbiguousRunlistSpecification, AmbiguousYAMLFile, Application, AttributeNotFound, AttributeTypeMismatch, BadProxyURI, BootstrapCommandInputError, CannotDetermineHomebrewOwner, CannotDetermineNodeName, CannotDetermineWindowsInstallerType, CannotValidateStaticallyError, CannotWritePrivateKey, ChecksumMismatch, ChildConvergeError, ClientUpgraded, CommandTimeout, ConflictingMembersInGroup, ContentLengthMismatch, CookbookChefVersionMismatch, CookbookFrozen, CookbookMergingError, CookbookNotFound, CookbookNotFoundInRepo, CookbookOhaiVersionMismatch, CookbookVersionConflict, CookbookVersionNameMismatch, CookbookVersionSelection, Cron, CurrentValueDoesNotExist, DSCModuleNameMissing, DeprecatedFeatureError, DsclCommandFailed, DuplicateDataBagItem, DuplicateRole, EnclosingDirectoryDoesNotExist, EnvironmentNotFound, ErlCall, Exec, Execute, FileContentStagingError, FileNotFound, FileTypeMismatch, GemRequirementConflict, Group, GroupIDNotFound, Ifconfig, IllegalChecksumRevert, IllegalVersionConstraint, ImmutableAttributeModification, InsufficientPermissions, InvalidClientAttribute, InvalidCommandOption, InvalidCookbookVersion, InvalidDataBagItemID, InvalidDataBagName, InvalidDataBagPath, InvalidEnvironmentPath, InvalidEnvironmentRunListSpecification, InvalidEventType, InvalidHomeDirectory, InvalidKeyArgument, InvalidKeyAttribute, InvalidPlatformVersion, InvalidPolicybuilderCall, InvalidPrivateKey, InvalidRedirect, InvalidRemoteFileURI, InvalidRemoteGitReference, InvalidResourceReference, InvalidResourceSpecification, InvalidSearchQuery, InvalidSymlink, InvalidUserAttribute, InvalidVersionConstraint, JSON, KeyCommandInputError, LCMParser, Link, MetadataNotFound, MetadataNotValid, MissingCookbookDependency, MissingKeyAttribute, MissingLibrary, MissingParentDirectory, MissingRole, Mount, MultipleDscResourcesFound, MultipleFailures, MultipleIdentityError, NoSuchAttribute, NoSuchResourceType, NoWindowsPackageSource, ObsoleteDependencySyntax, OnlyApiVersion0SupportedForAction, Override, PIDFileLockfileMatch, Package, PlistUtilCommandFailed, PowershellCmdletException, PrivateKeyMissing, ProviderNotFound, Reboot, RebootFailed, RebootPending, RecipeNotFound, RedirectLimitExceeded, RegKeyValuesDataMissing, RegKeyValuesTypeMissing, RequestedUIDUnavailable, ResourceNotFound, RestError, RestOperationFailed, RestTargetError, RestTimeout, RoleNotFound, Route, RunFailedWrappingError, RunLockTimeout, Script, SearchIndex, Secret, Service, SigInt, SigTerm, SolrConnectionError, StaleAttributeRead, UnifiedModeBeforeSubscriptionEarlierResource, UnifiedModeImmediateSubscriptionEarlierResource, UnresolvableGitReference, UnsupportedAction, UnsupportedPlatform, User, UserIDNotFound, ValidationFailed, VerificationNotFound, Win32APIError, Win32APIFunctionNotImplemented, Win32ArchitectureIncorrect, Win32NotWindows, Win32RegArchitectureIncorrect, Win32RegBadType, Win32RegBadValueSize, Win32RegDataMissing, Win32RegHiveMissing, Win32RegKeyMissing, Win32RegNoRecursive, Win32RegTypeDoesNotExist, Win32RegTypesMismatch, Win32RegValueExists, Win32RegValueMissing, WindowsEnv, WindowsNotAdmin

Constant Summary collapse

ConfigurationError =
ChefConfig::ConfigurationError
NoProviderAvailable =
ProviderNotFound

Class Method Summary collapse

Class Method Details

.const_missing(const_name) ⇒ Object



35
36
37
38
39
40
41
42
43
44
# File 'lib/chef/exceptions.rb', line 35

def self.const_missing(const_name)
  if const_name == :ShellCommandFailed
    Chef::Log.warn("Chef::Exceptions::ShellCommandFailed is deprecated, use Mixlib::ShellOut::ShellCommandFailed")
    called_from = caller[0..3].inject("Called from:\n") { |msg, trace_line| msg << "  #{trace_line}\n" }
    Chef::Log.warn(called_from)
    Mixlib::ShellOut::ShellCommandFailed
  else
    super
  end
end