Last active
August 24, 2018 14:22
-
-
Save alfian0/dacef236fa4b3d7d146a6a2a53c1a081 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
HRESULT error = S_OK; | |
if (SUCCEEDED(Operation1()) && SUCCEEDED(Operation2()) && SUCCEEDED(Operation3()) && SUCCEEDED(Operation4())) { | |
return S_OK; | |
} else { | |
return OPERATIONFAILED; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
HRESULT error = S_OK; | |
if(SUCCEEDED(Operation1())) { | |
if(SUCCEEDED(Operation2())) { | |
if(SUCCEEDED(Operation3())) { | |
if(SUCCEEDED(Operation4())) { | |
} else { | |
error = OPERATION4FAILED; | |
} | |
} else { | |
error = OPERATION3FAILED; | |
} | |
} else { | |
error = OPERATION2FAILED; | |
} | |
} else { | |
error = OPERATION1FAILED; | |
} | |
return error; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
if (!SUCCEEDED(Operation1())) { | |
return OPERATION1FAILED; | |
} | |
if (!SUCCEEDED(Operation2())) { | |
return OPERATION2FAILED; | |
} | |
if (!SUCCEEDED(Operation3()) { | |
return OPERATION3FAILED; | |
} | |
if (!SUCCEEDED(Operation4())) { | |
return OPERATION4FAILED; | |
} else { | |
return S_OK; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment