Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
3ae0aad7
Commit
3ae0aad7
authored
Nov 02, 2012
by
Russell Belfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move error capture to top of giterr_set
parent
1362a983
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/errors.c
+4
-4
No files found.
src/errors.c
View file @
3ae0aad7
...
...
@@ -40,17 +40,17 @@ void giterr_set(int error_class, const char *string, ...)
{
git_buf
buf
=
GIT_BUF_INIT
;
va_list
arglist
;
#ifdef GIT_WIN32
DWORD
win32_error_code
=
(
error_class
==
GITERR_OS
)
?
GetLastError
()
:
0
;
#endif
int
error_code
=
(
error_class
==
GITERR_OS
)
?
errno
:
0
;
va_start
(
arglist
,
string
);
git_buf_vprintf
(
&
buf
,
string
,
arglist
);
va_end
(
arglist
);
if
(
error_class
==
GITERR_OS
)
{
int
error_code
=
errno
;
#ifdef GIT_WIN32
DWORD
win32_error_code
=
GetLastError
();
if
(
win32_error_code
)
{
char
*
lpMsgBuf
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment