diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-04 05:02:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:19:10 -0500 |
commit | 54fba5b1b875cdb549510ad1d218b39b2a3c6d64 (patch) | |
tree | 274463c9fbd5810e15b5614c060fd3592a9909b5 /source4/include | |
parent | 934831686c2bde9bdd9fbb050ac10341b32c83fa (diff) | |
download | samba-54fba5b1b875cdb549510ad1d218b39b2a3c6d64.tar.gz samba-54fba5b1b875cdb549510ad1d218b39b2a3c6d64.tar.bz2 samba-54fba5b1b875cdb549510ad1d218b39b2a3c6d64.zip |
r8116: demonstrate a little trick that can be used to track down where an
error is coming from. In this case I needed to know where a
NT_STATUS_ACCESS_DENIED was being returned, which is a very common
error, but I needed to know which place in the code was giving it
(This used to be commit 692bb1c8a1428917ed6c516d02524c2f76157181)
Diffstat (limited to 'source4/include')
-rw-r--r-- | source4/include/nterr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/include/nterr.h b/source4/include/nterr.h index 6680b7ecec..1cf0b6a8d1 100644 --- a/source4/include/nterr.h +++ b/source4/include/nterr.h @@ -92,7 +92,12 @@ #define NT_STATUS_INVALID_VIEW_SIZE NT_STATUS(0xC0000000 | 0x001f) #define NT_STATUS_INVALID_FILE_FOR_SECTION NT_STATUS(0xC0000000 | 0x0020) #define NT_STATUS_ALREADY_COMMITTED NT_STATUS(0xC0000000 | 0x0021) +#if 0 +/* this demonstrates a little trick when tracking down error codes */ +#define NT_STATUS_ACCESS_DENIED (printf("access denied at %s\n", __location__), NT_STATUS(0xC0000000 | 0x0022)) +#else #define NT_STATUS_ACCESS_DENIED NT_STATUS(0xC0000000 | 0x0022) +#endif #define NT_STATUS_BUFFER_TOO_SMALL NT_STATUS(0xC0000000 | 0x0023) #define NT_STATUS_OBJECT_TYPE_MISMATCH NT_STATUS(0xC0000000 | 0x0024) #define NT_STATUS_NONCONTINUABLE_EXCEPTION NT_STATUS(0xC0000000 | 0x0025) |