Construct the ProfInfoErr error object. It adds properties in IProfInfoErrParms to the existing properties of ImperativeError.
ImperativeError details and text (stack, messages, etc.)
ProfInfoErr parms and ImperativeError control parameters.
Additional error properties, specific to ProfInfoErr.
Unable to retrieve the schema from a URL reference. Currently, the ProfiInfo API does not attempt to retrieve a schema through a URL. A URL does work to provide intellisense in VSCode when editing a config file.
The specified type of profile location is invalid for the requested operation.
Failed to initialize ProfileCredentials and load the credential manager.
Failed to load the schema for a specified type of profile.
A required profile property was not assigned a value.
The ProfileInfo.readProfilesFromDisk function was not called before a function which requires that prerequisite.
A specified profile was not found (V1)
A specified property that is expected to exist in a specified profile does not exist in that profile.
A specified property that is expected to exist in a specified profile does not have OS and JSON locations defined.
Return additionalDetails
Return causeErrors
Return IImperativeError object
Return errorCode
Accessor for the error message.
: The error message
Return stack info
Return whether or not the error dump should be suppressed
Within the Zowe client SDK, errors are often thrown, caught, modified, and re-thrown. Sometimes the error that we catch is a standard JavaScript Error. Other times the error is already an ImperativeError (which can contain more details). A hard-coded reliance on ImperativeError properties like causeErrors and additionalDetails will not work if the existingErr is a standard JavaScript Error. Also, the properties of an ImperativeError can be nested under various properties within its causeErrors property.
The purpose of this utility function is to interrogate the existing error to form the most meaningful ImperativeError possible.
An existing error to be incorporated into the resulting ImperativeError.
The main message text for the resulting ImperativeError. If not supplied,
the existingErr.message value will be used.
A newly created ImperativeError
Generated using TypeDoc
This class is the error exception mechanism for the ProfileInfo API. It is derived from ImperativeError. We use a separate class so that our consumer can check the type of error, and then rely on errorCode values that are unique to ProfInfoErr. ProfInfoErr will always populate the errorCode property. Our consumer can use the errorCode to determine if it should process partial results.