Tightened the source code and README documentations in the library.

This commit is contained in:
2026-09-18 12:45:39 +02:00
parent c9f887bacb
commit 9ae10590cc
97 changed files with 854 additions and 1142 deletions
@@ -1,15 +1,13 @@
/// An error reported by the Playdate OS.
public struct PlaydateError: Swift.Error, Sendable {
/// The message reported by the OS, or a description of the failure.
/// The OS message, or a description of the failure.
public let message: String
/// Creates an error with the given message.
init(message: String) {
self.message = message
}
/// Creates an error by copying an OS-provided C string; a nil pointer
/// produces "unknown error".
/// Copies an OS C string; null yields "unknown error".
init(cString: UnsafePointer<CChar>?) {
self.init(message: String(playdateCString: cString) ?? "unknown error")
}