YamlError
public enum YamlError : Error
extension YamlError: CustomStringConvertible
Errors thrown by Yams APIs.
-
YAML_NO_ERROR
. No error is produced.Declaration
Swift
case no
-
YAML_MEMORY_ERROR
. Cannot allocate or reallocate a block of memory.Declaration
Swift
case memory
-
YAML_READER_ERROR
. Cannot read or decode the input stream.Declaration
Swift
case reader(problem: String, offset: Int?, value: Int32, yaml: String)
Parameters
problem
Error description.
offset
The offset from
yaml.startIndex
at which the problem occured.value
The problematic value (-1 is none).
yaml
YAML String which the problem occured while reading.
-
YAML_SCANNER_ERROR
. Cannot scan the input stream.Parameters
context
Error context.
problem
Error description.
mark
Problem position.
yaml
YAML String which the problem occured while scanning.
-
YAML_PARSER_ERROR
. Cannot parse the input stream.Parameters
context
Error context.
problem
Error description.
mark
Problem position.
yaml
YAML String which the problem occured while parsing.
-
YAML_COMPOSER_ERROR
. Cannot compose a YAML document.Parameters
context
Error context.
problem
Error description.
mark
Problem position.
yaml
YAML String which the problem occured while composing.
-
YAML_WRITER_ERROR
. Cannot write to the output stream.Declaration
Swift
case writer(problem: String)
Parameters
problem
Error description.
-
YAML_EMITTER_ERROR
. Cannot emit a YAML stream.Declaration
Swift
case emitter(problem: String)
Parameters
problem
Error description.
-
Used in
NodeRepresentable
.Declaration
Swift
case representer(problem: String)
Parameters
problem
Error description.
-
String data could not be decoded with the specified encoding.
Declaration
Swift
case dataCouldNotBeDecoded(encoding: String.Encoding)
Parameters
encoding
The string encoding used to decode the string data.
-
The error context.
See moreDeclaration
Swift
public struct Context : CustomStringConvertible
-
A textual representation of this instance.
Declaration
Swift
public var description: String { get }