#[repr(u32)]pub enum ServiceManagementError {
InternalFailure = 2,
InvalidSignature = 3,
AuthorizationFailure = 4,
ToolNotValid = 5,
JobNotFound = 6,
ServiceUnavailable = 7,
JobPlistNotFound = 8,
JobMustBeEnabled = 9,
InvalidPlist = 10,
LaunchDeniedByUser = 11,
AlreadyRegistered = 12,
Unknown(u32),
}
Expand description
Represents errors that can occur when registering or unregistering services.
This enum wraps the error codes returned by the ServiceManagement framework.
Variants§
InternalFailure = 2
An internal failure has occurred in the ServiceManagement framework.
InvalidSignature = 3
The app’s code signature doesn’t meet the requirements to perform the operation.
This often occurs when the application is not properly signed or lacks the required entitlements.
AuthorizationFailure = 4
The authorization requested failed.
ToolNotValid = 5
The specified path doesn’t exist or the helper tool at the specified path isn’t valid.
JobNotFound = 6
The system can’t find the specified job.
The service necessary to perform this operation is unavailable or is no longer accepting requests.
JobPlistNotFound = 8
The system can’t find the app’s property list file.
JobMustBeEnabled = 9
The job must be enabled before performing the requested operation.
InvalidPlist = 10
The app’s property list is invalid or contains errors.
LaunchDeniedByUser = 11
The user denied the app’s launch request through a system prompt.
AlreadyRegistered = 12
The application is already registered with the ServiceManagement framework.
Unknown(u32)
An unrecognized error code was returned by the ServiceManagement framework.
Implementations§
Source§impl ServiceManagementError
impl ServiceManagementError
Sourcepub fn code(&self) -> u32
pub fn code(&self) -> u32
Returns the error code associated with this error.
This method returns the underlying error code that corresponds to the ServiceManagement framework error constants.
§Examples
use smappservice_rs::ServiceManagementError;
let error = ServiceManagementError::InvalidSignature;
let code = error.code();
println!("Error code: {}", code);