Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/elixir/lib/exception.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2492,8 +2492,8 @@ defmodule File.LinkError do

For example, this exception is raised when trying to link to file that isn't present:

iex> File.ln!("source.txt", "target.txt")
** (File.LinkError) could not create hard link from "source.txt" to "target.txt": no such file or directory
iex> File.ln!("existing.txt", "link.txt")
** (File.LinkError) could not create hard link from "link.txt" to "existing.txt": no such file or directory

The following fields of this exception are public and can be accessed freely:

Expand All @@ -2509,8 +2509,8 @@ defmodule File.LinkError do
def message(exception) do
formatted = IO.iodata_to_binary(:file.format_error(exception.reason))

"could not #{exception.action} from #{inspect(exception.existing)} to " <>
"#{inspect(exception.new)}: #{formatted}"
"could not #{exception.action} from #{inspect(exception.new)} to " <>
"#{inspect(exception.existing)}: #{formatted}"
end
end

Expand Down
Loading