** Set the error code and error message for the recover handle passed as ** the first argument. The error code is set to the value of parameter ** errCode. ** ** Parameter zFmt must be a printf() style formatting string. The handle ** error message is set to the result of using any trailing arguments for ** parameter substitutions in the formatting string. ** ** For example: ** ** recoverError
| 13819 | ** recoverError(p, SQLITE_ERROR, "no such table: %s", zTablename); |
| 13820 | */ |
| 13821 | static int recoverError( |
| 13822 | sqlite3_recover *p, |
| 13823 | int errCode, |
| 13824 | const char *zFmt, ... |
| 13825 | ){ |
| 13826 | char *z = 0; |
| 13827 | va_list ap; |
| 13828 | va_start(ap, zFmt); |
| 13829 | if( zFmt ){ |
| 13830 | z = sqlite3_vmprintf(zFmt, ap); |
| 13831 | va_end(ap); |
| 13832 | } |
| 13833 | sqlite3_free(p->zErrMsg); |
| 13834 | p->zErrMsg = z; |
| 13835 | p->errCode = errCode; |
| 13836 | return errCode; |
| 13837 | } |
| 13838 | |
| 13839 | |
| 13840 | /* |
no outgoing calls
no test coverage detected