1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; indent-tabs-mode: nil -*-
3 ;;; --- Error conditions.
6 (in-package :io.zeta-streams
)
8 (define-condition posix-file-error
(file-error)
9 ((action :initarg
:action
:reader posix-file-error-action
)
10 (code :initarg
:code
:reader posix-file-error-code
)
11 (identifier :initarg
:identifier
:reader posix-file-error-identifier
))
12 (:report
(lambda (condition stream
)
13 (format stream
"Error while ~A ~S: ~A"
14 (posix-file-error-action condition
)
15 (file-error-pathname condition
)
16 (nix:strerror
(posix-file-error-code condition
))))))