include/git2/errors.h


Log

Author Commit Date CI Message
Carlos Martín Nieto 4376f7f6 2012-03-06T08:12:35 error-handling: remote, transport
Vicent Martí 73fe6a8e 2012-03-28T18:59:12 error-handling: Commit (WIP)
Russell Belfer 7c7ff7d1 2012-03-19T16:10:11 Migrate index, oid, and utils to new errors This includes a few cleanups that came up while converting these files. This commit introduces a could new git error classes, including the catchall class: GITERR_INVALID which I'm using as the class for invalid and out of range values which are detected at too low a level of library to use a higher level classification. For example, an overflow error in parsing an integer or a bad letter in parsing an OID string would generate an error in this class.
Russell Belfer e3c47510 2012-03-13T14:23:24 Resolve comments from pull request This converts the map validation function into a macro, tweaks the GITERR_OS system error automatic appending, and adds a tentative new error access API and some quick unit tests for both the old and new error APIs.
Russell Belfer e1de726c 2012-03-12T22:55:40 Migrate ODB files to new error handling This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to the new style of error handling. Also got the unix and win32 versions of map.c. There are some minor changes to other files but no others were completely converted. This also contains an update to filebuf so that a zeroed out filebuf will not think that the fd (== 0) is actually open (and inadvertently call close() on fd 0 if cleaned up). Lastly, this was built and tested on win32 and contains a bunch of fixes for the win32 build which was pretty broken.
Vicent Martí dda708e7 2012-03-09T19:55:50 error-handling: On-disk config file backend Includes: - Proper error reporting when encountering syntax errors in a config file (file, line number, column). - Rewritten `config_write`, now with 99% less goto-spaghetti - Error state in `git_filebuf`: filebuf write functions no longer need to be checked for error returns. If any of the writes performed on a buffer fail, the last call to `git_filebuf_commit` or `git_filebuf_hash` will fail accordingly and set the appropiate error message. Baller!
Vicent Martí e54d8d89 2012-03-07T01:37:09 error-handling: Config
Vicent Martí cb8a7961 2012-03-07T00:02:55 error-handling: Repository This also includes droping `git_buf_lasterror` because it makes no sense in the new system. Note that in most of the places were it has been dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so instead it should return a generic `-1` and obviously not throw anything.
Vicent Martí 1a481123 2012-02-17T00:13:34 error-handling: References Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
Vicent Martí 45d387ac 2012-02-15T16:54:17 refs: Error handling rework. WIP
Vicent Martí 60bc2d20 2012-02-14T21:23:11 error-handling: Add new routines Obviously all the old throw routines are still in place, so we can gradually port over.
schu 5e0de328 2012-02-13T17:10:24 Update Copyright header Signed-off-by: schu <schu-github@schulog.org>
Vicent Marti 87d9869f 2011-09-19T03:34:49 Tabify everything There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
Vicent Marti bb742ede 2011-09-19T01:54:32 Cleanup legal data 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
Vicent Martí f12aa9dc 2011-07-05T04:31:37 Merge pull request #300 from carlosmn/gsoc2011/master A bit of networking
Vicent Marti ab7941b5 2011-06-28T21:04:59 test: Properly show error messages
Carlos Martín Nieto 7632e249 2011-06-13T23:01:12 Correctly handle network input Add a parameter to git_pkt_parse_line to tell it how much data you have in your buffer. If the buffer is too short, it returns an error saying so. Adapt the git transport to use this and fix the offset calculation. Add the GIT_ESHORTBUFFER error code.
Carlos Martín Nieto 63f91e1c 2011-06-22T16:52:30 Add git.git's fnmatch, which is really GNU's and the git__fnmatch wrapper If the strings match, git__fnmatch returns GIT_SUCCESS and GIT_ENOMATCH on failure to match. MSVC fixes: Added a test for _MSC_VER and (in that case) defined HAVE_STRING_H to 1 so it doesn't try to include <strings.h> which doesn't exist in the MSVC world. Moved the function declarations to use the modern inline ones so MSVC doesn't have a fit. Added casts everywhere so MSVC doesn't crap its pants. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Vicent Marti 984ed6b6 2011-06-19T12:48:16 odb: Add GIT_EPASSTHROUGH Allows a custom user backend to passthrough one of the callbacks. Used for e.g. caching backends.
Marc Pegon 53c0bd81 2011-05-27T22:37:10 Added error for ambiguous oid prefixes. Added methods to compare the first nth hexadecimal characters (i.e. packets of 4 bits) of OIDs.
Vicent Marti f87d9beb 2011-05-15T23:46:39 Change error codes from DEFINEs to an enum
Vicent Marti f31bd03f 2011-05-13T04:15:46 Include "common.h" in "errors.h"
Vicent Marti 6810bf28 2011-05-11T00:40:07 Move all error-related defines to `git2/errors.h`
Vicent Marti f4a936b5 2011-05-11T00:35:05 Bring back `git_strerror` We cannot totally deprecate this until the new error handling mechanisms are all in place.
Vicent Marti 5eb0fab8 2011-05-05T01:49:27 errors: Update external API with new `git_lasterror`
Vicent Marti 71d33382 2011-03-03T20:20:45 Move the external includes folder from `src` to `include` Signed-off-by: Vicent Marti <tanoku@gmail.com>