What error will be thrown if db.CreateDocument() fails or can it fail? Your designer documentation for this methods does not tell you (at least in 8.0.x). Please add more information about errorcodes to the method documentation.
Take, for example, error number 4000.
In my practice, I came across several instances of its occurrence:
1. Notes error: The server is not responding. The server may be down or you may be experiencing network problems. Contact your system administrator if this problem persists.
2. Notes error: ...