Skip to content
bbminfo – Learn from Scratch
Subjects Code examples Library reference
Computer Programming Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy

Tutorial menu

Subjects

Computer Programming MathsPlanned ChemistryPlanned

Lesson contents

Programming resources

All languages Code examples Library reference

Programming languages

Python Java C++ C Go PHP Kotlin Ruby R Scala Groovy
Tutorials/Computer Programming/Go/Library/Errors and exceptions

Go errors and exceptions

Handle invalid entries, missing records, and interrupted work. Follow each failure from the input that triggers it to a response the user can act on.

errors.Is and fs.ErrNotExistInteger divisor checktime.Parse error

Browse by topic

  • Input and validation5
  • State and collections2
  • Files and streams2
  • Jobs and runtime2
  • Handling and diagnostics1

Input and validation

  • Comma-ok type assertionCheck the type of an imported fare
  • nil pointer checkPrint a label when the phone number is missing
  • regexp.Compile errorValidate a saved product search
  • strconv.Atoi errorReject a mistyped order quantity
  • time.Parse errorCheck a delivery date entered on a form
Advertisements

State and collections

  • Integer divisor checkSplit an equipment fee across a class
  • Slice bounds checkFind a seat after the coach changes

Files and streams

  • errors.Is and fs.ErrNotExistRecover when a receipt is missing
  • io.ErrUnexpectedEOFRead a stock count from a short record

Jobs and runtime

  • context.CanceledCollect a cancelled print job
  • context.DeadlineExceededLimit the wait for a shipping quote

Handling and diagnostics

  • errors.Is and fmt.ErrorfRecognize a wrapped lookup error

All Go library sections

Go tutorials

Environment setup› Library reference› Data structures› Code examples›
Advertisements
bbminfo – Learn from Scratch
© 2026 bbminfoArtwork creditsPrivacy policy