nerdexam
CompTIA

CAS-003 · Question #324

Given the following code snippet: Which of the following failure modes would the code exhibit?

The correct answer is D. Exception. The code snippet (not visible in this question) exhibits an exception failure mode, meaning it throws an unhandled runtime exception rather than failing in a controlled, intentional manner.

Technical Integration of Enterprise Security

Question

Given the following code snippet:

Which of the following failure modes would the code exhibit?

Exhibit

CAS-003 question #324 exhibit

Options

  • AOpen
  • BSecure
  • CHalt
  • DException

How the community answered

(24 responses)
  • A
    8% (2)
  • B
    13% (3)
  • C
    4% (1)
  • D
    75% (18)

Why each option

The code snippet (not visible in this question) exhibits an exception failure mode, meaning it throws an unhandled runtime exception rather than failing in a controlled, intentional manner.

AOpen

Fail-open is an intentional design pattern where the system grants access or continues operation when an error occurs, requiring explicit conditional logic to detect the error and allow passage - not an unhandled exception.

BSecure

Fail-secure (fail-closed) is an intentional design pattern where the system denies access or locks down when an error is detected, indicating deliberate defensive error handling was implemented in the code.

CHalt

A halt failure mode means execution terminates cleanly and explicitly, which requires intentional handling logic such as a system exit call; an unhandled exception typically produces an error trace rather than a controlled clean halt.

DExceptionCorrect

An exception failure mode occurs when code encounters an unexpected error condition - such as a null reference, out-of-bounds access, or type mismatch - without a surrounding try/catch or error handling block, causing the runtime to throw an unhandled exception instead of gracefully transitioning to a defined safe or failed state.

Concept tested: Application failure modes and unhandled exception behavior

Source: https://owasp.org/www-community/Fail_securely

Topics

#failure modes#secure coding#exception handling#error handling

Community Discussion

No community discussion yet for this question.

Full CAS-003 Practice