Error handling.
pattern matching