Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/reftable/error.c # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / reftable / error.c` 46 lines ยท 1145 bytes Raw Blame History 1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Use of this source code is governed by a BSD-style 5 * license that can be found in the LICENSE file or at 6 * https://developers.google.com/open-source/licenses/bsd 7 */ 8 9 #include "system.h" 10 #include "reftable-error.h" 11 12 #include 13 14 const char *reftable_error_str(int err) 15 { 16 static char buf[250]; 17 switch (err) { 18 case REFTABLE_IO_ERROR: 19 return "I/O error"; 20 case REFTABLE_FORMAT_ERROR: 21 return "corrupt reftable file"; 22 case REFTABLE_NOT_EXIST_ERROR: 23 return "file does not exist"; 24 case REFTABLE_LOCK_ERROR: 25 return "data is locked"; 26 case REFTABLE_API_ERROR: 27 return "misuse of the reftable API"; 28 case REFTABLE_ZLIB_ERROR: 29 return "zlib failure"; 30 case REFTABLE_EMPTY_TABLE_ERROR: 31 return "wrote empty table"; 32 case REFTABLE_REFNAME_ERROR: 33 return "invalid refname"; 34 case REFTABLE_ENTRY_TOO_BIG_ERROR: 35 return "entry too large"; 36 case REFTABLE_OUTDATED_ERROR: 37 return "data concurrently modified"; 38 case REFTABLE_OUT_OF_MEMORY_ERROR: 39 return "out of memory"; 40 case -1: 41 return "general error"; 42 default: 43 snprintf(buf, sizeof(buf), "unknown error code %d", err); 44 return buf; 45 } 46 }