Search for FoundationErrors.h on your Mac, you will get an extensive list.
I think here is the most extensive list (some may not be related to moveItemAtPath) :
NS_ERROR_ENUM(NSCocoaErrorDomain) {
// File system and file I/O related errors, with NSFilePathErrorKey or NSURLErrorKey containing path or URL
NSFileNoSuchFileError = 4, // Attempt to do a file system operation on a non-existent file
NSFileLockingError = 255, // Couldn't get a lock on file
NSFileReadUnknownError = 256, // Read error (reason unknown)
NSFileReadNoPermissionError = 257, // Read error (permission problem)
NSFileReadInvalidFileNameError = 258, // Read error (invalid file name)
NSFileReadCorruptFileError = 259, // Read error (file corrupt, bad format, etc)
NSFileReadNoSuchFileError = 260, // Read error (no such file)
NSFileReadInapplicableStringEncodingError = 261, // Read error (string encoding not applicable) also NSStringEncodingErrorKey
NSFileReadUnsupportedSchemeError = 262, // Read error (unsupported URL scheme)
NSFileReadTooLargeError API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 263, // Read error (file too large)
NSFileReadUnknownStringEncodingError API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 264, // Read error (string encoding of file contents could not be determined)
NSFileWriteUnknownError = 512, // Write error (reason unknown)
NSFileWriteNoPermissionError = 513, // Write error (permission problem)
NSFileWriteInvalidFileNameError = 514, // Write error (invalid file name)
NSFileWriteFileExistsError API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = 516, // Write error (file exists)
NSFileWriteInapplicableStringEncodingError = 517, // Write error (string encoding not applicable) also NSStringEncodingErrorKey
NSFileWriteUnsupportedSchemeError = 518, // Write error (unsupported URL scheme)
NSFileWriteOutOfSpaceError = 640, // Write error (out of disk space)
NSFileWriteVolumeReadOnlyError API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) = 642, // Write error (readonly volume)
Read also
https://stackoverflow.com/questions/31977738/how-to-find-the-kind-of-errors-a-method-may-throw-and-catch-them-in-swift
To report the error:
do {
try moveItemAtPath()
// Continue what you need to do if successful
} catch let error as NSError {
// Better to report error message here
print("Something went wrong: \(error)")
return // If you are inside a func
}