nerdexam
(ISC)2

CSSLP · Question #243

In which of the following levels of exception safety are operations succeeded with full guarantee and fulfill all needs in the presence of exceptional situations?

The correct answer is C. Failure transparency. Failure transparency, also known as the 'no-fail guarantee' or 'strong exception safety', ensures that operations either fully succeed or fail in a way that the system state remains unchanged and the failure is completely masked from the caller.

Secure Software Concepts

Question

In which of the following levels of exception safety are operations succeeded with full guarantee and fulfill all needs in the presence of exceptional situations?

Options

  • ACommit or rollback semantics
  • BMinimal exception safety
  • CFailure transparency
  • DBasic exception safety

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    7% (2)
  • C
    85% (23)
  • D
    4% (1)

Why each option

Failure transparency, also known as the 'no-fail guarantee' or 'strong exception safety', ensures that operations either fully succeed or fail in a way that the system state remains unchanged and the failure is completely masked from the caller.

ACommit or rollback semantics

Commit or rollback semantics describe transactional behavior, which is a mechanism to achieve strong exception safety but is not a level of exception safety itself.

BMinimal exception safety

Minimal exception safety, also known as the 'no-leak guarantee', means that no resources are leaked, but the program state might be undefined or changed.

CFailure transparencyCorrect

Failure transparency, or strong exception safety, guarantees that if an operation throws an exception, the program state remains exactly as it was before the operation began, or the operation fully completes without any side effects observable by the caller.

DBasic exception safety

Basic exception safety, also known as the 'no-corrupt guarantee', ensures that if an exception occurs, the program remains in a valid, consistent state, but the exact state might be different from the original and resources might not be restored to their initial values.

Concept tested: Exception safety levels - Failure Transparency

Topics

#Exception Safety#Error Handling#Secure Coding#Software Resilience

Community Discussion

No community discussion yet for this question.

Full CSSLP Practice