2017-08-20 20:35:14 +00:00
|
|
|
defmodule RDF.IRI.InvalidError do
|
2016-11-04 21:13:06 +00:00
|
|
|
defexception [:message]
|
|
|
|
end
|
|
|
|
|
2017-08-20 20:35:14 +00:00
|
|
|
defmodule RDF.Literal.InvalidError do
|
2016-11-04 21:13:06 +00:00
|
|
|
defexception [:message]
|
|
|
|
end
|
|
|
|
|
|
|
|
defmodule RDF.Triple.InvalidSubjectError do
|
|
|
|
defexception [:subject]
|
|
|
|
|
|
|
|
def message(%{subject: subject}) do
|
|
|
|
"'#{inspect(subject)}' is not a valid subject of a RDF.Triple"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
defmodule RDF.Triple.InvalidPredicateError do
|
|
|
|
defexception [:predicate]
|
|
|
|
|
|
|
|
def message(%{predicate: predicate}) do
|
|
|
|
"'#{inspect(predicate)}' is not a valid predicate of a RDF.Triple"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-02-18 20:35:27 +00:00
|
|
|
defmodule RDF.Quad.InvalidGraphContextError do
|
|
|
|
defexception [:graph_context]
|
|
|
|
|
|
|
|
def message(%{graph_context: graph_context}) do
|
|
|
|
"'#{inspect(graph_context)}' is not a valid graph context of a RDF.Quad"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2022-04-08 12:20:51 +00:00
|
|
|
defmodule RDF.Graph.EmptyDescriptionError do
|
|
|
|
defexception [:subject]
|
|
|
|
|
|
|
|
def message(%{subject: subject}) do
|
|
|
|
"""
|
|
|
|
RDF.Graph with empty description about '#{inspect(subject)}' detected.
|
|
|
|
Empty descriptions in a graph lead to inconsistent behaviour. The RDF.Graph API
|
|
|
|
should ensure that this never happens. So this probably happened by changing the
|
|
|
|
contents of the RDF.Graph struct directly, which is strongly discouraged.
|
|
|
|
You should always use the RDF.Graph API to change the content of a graph.
|
|
|
|
If this happened while using the RDF.Graph API, this is a bug.
|
|
|
|
Please report this at https://github.com/rdf-elixir/rdf-ex/issues and describe the
|
|
|
|
circumstances how this happened.
|
|
|
|
"""
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
defmodule RDF.XSD.Datatype.Mismatch do
|
|
|
|
defexception [:value, :expected_type]
|
|
|
|
|
|
|
|
def message(%{value: value, expected_type: expected_type}) do
|
|
|
|
"'#{inspect(value)}' is not a #{expected_type}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-08-20 20:35:14 +00:00
|
|
|
defmodule RDF.Namespace.InvalidVocabBaseIRIError do
|
2016-11-04 21:13:06 +00:00
|
|
|
defexception [:message]
|
|
|
|
end
|
|
|
|
|
2017-05-26 11:54:04 +00:00
|
|
|
defmodule RDF.Namespace.InvalidTermError do
|
|
|
|
defexception [:message]
|
|
|
|
end
|
|
|
|
|
|
|
|
defmodule RDF.Namespace.InvalidAliasError do
|
|
|
|
defexception [:message]
|
|
|
|
end
|
|
|
|
|
2017-03-12 13:27:52 +00:00
|
|
|
defmodule RDF.Namespace.UndefinedTermError do
|
2016-11-04 21:13:06 +00:00
|
|
|
defexception [:message]
|
|
|
|
end
|
2020-06-09 23:13:01 +00:00
|
|
|
|
|
|
|
defmodule RDF.Query.InvalidError do
|
|
|
|
defexception [:message]
|
|
|
|
end
|
2022-03-08 22:27:25 +00:00
|
|
|
|
|
|
|
defmodule RDF.Resource.Generator.ConfigError do
|
|
|
|
defexception [:message]
|
|
|
|
end
|