MCPcopy Create free account
hub / github.com/PowerShell/DSC / get_failure_from_error

Function get_failure_from_error

lib/dsc-lib/src/configure/mod.rs:1408–1424  ·  view source on GitHub ↗
(err: &DscError)

Source from the content-addressed store, hash-verified

1406}
1407
1408fn get_failure_from_error(err: &DscError) -> Option<Failure> {
1409 match err {
1410 DscError::CommandExit(_resource, exit_code, reason) => {
1411 Some(Failure {
1412 message: reason.to_string(),
1413 exit_code: *exit_code,
1414 })
1415 },
1416 DscError::CommandExitFromManifest(_resource, exit_code, reason) => {
1417 Some(Failure {
1418 message: reason.to_string(),
1419 exit_code: *exit_code,
1420 })
1421 },
1422 _ => None,
1423 }
1424}

Callers 4

invoke_getMethod · 0.85
invoke_setMethod · 0.85
invoke_testMethod · 0.85
invoke_exportMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected