Error Handling interview questions

15 real Error Handling questions from the Go bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is error interface?

Junior
  1. A.the built-in single-method contract with an Error returning string that idiomatic functions return as a final value
  2. B.the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  3. C.attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
  4. D.the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.error interface — the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  2. B.error interface — the built-in single-method contract with an Error returning string that idiomatic functions return as a final value
  3. C.error interface — attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
  4. D.error interface — the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
Reveal the answer + AI explanation — free account

4. What is Error wrapping?

Mid
  1. A.the built-in single-method contract with an Error returning string that idiomatic functions return as a final value
  2. B.the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  3. C.the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
  4. D.attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.Error wrapping — the built-in single-method contract with an Error returning string that idiomatic functions return as a final value
  2. B.Error wrapping — the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
  3. C.Error wrapping — the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  4. D.Error wrapping — attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
Reveal the answer + AI explanation — free account

7. What is errors.Is?

Mid
  1. A.the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
  2. B.attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
  3. C.the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  4. D.the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.errors.Is — attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
  2. B.errors.Is — the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  3. C.errors.Is — the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
  4. D.errors.Is — the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
Reveal the answer + AI explanation — free account

10. What is panic?

Mid
  1. A.the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
  2. B.the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
  3. C.attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
  4. D.the helper that reports whether any error in a wrapped chain matches a specific sentinel target
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.panic — the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  2. B.panic — the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
  3. C.panic — the built-in single-method contract with an Error returning string that idiomatic functions return as a final value
  4. D.panic — the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
Reveal the answer + AI explanation — free account

13. What is recover?

Senior
  1. A.the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
  2. B.the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
  3. C.the built-in single-method contract with an Error returning string that idiomatic functions return as a final value
  4. D.attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Senior
  1. A.recover — the builtin that stops normal flow, runs deferred calls up the stack, and crashes the program if not recovered
  2. B.recover — attaching context to a returned failure using the %w verb in fmt.Errorf so the original can be unwrapped later
  3. C.recover — the helper that reports whether any error in a wrapped chain matches a specific sentinel target
  4. D.recover — the builtin, valid only inside a deferred function, that stops a panicking sequence and resumes normal execution
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Error Handling free