diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-11-23 09:43:35 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-11-23 09:43:35 +0100 |
commit | f689984f35225f6e93ff2614df65a03de1cad8c4 (patch) | |
tree | 0024a090d1d638ce197af6748f2c1b7ec3b7cd7e | |
parent | ec008afd281367757fe2f05c844cddfc8cabd7f8 (diff) | |
download | libtasn1-f689984f35225f6e93ff2614df65a03de1cad8c4.tar.gz libtasn1-f689984f35225f6e93ff2614df65a03de1cad8c4.tar.bz2 libtasn1-f689984f35225f6e93ff2614df65a03de1cad8c4.zip |
better error printing
-rw-r--r-- | lib/ASN1.c | 3 | ||||
-rw-r--r-- | lib/ASN1.y | 3 | ||||
-rw-r--r-- | src/asn1Parser.c | 2 |
3 files changed, 7 insertions, 1 deletions
@@ -3021,6 +3021,9 @@ _asn1_create_errorDescription (int error, char *error_desc) switch (error) { + case ASN1_FILE_NOT_FOUND: + snprintf(error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, "%s file was not found", file_name); + break; case ASN1_SYNTAX_ERROR: strcpy(error_desc, last_error); break; @@ -607,6 +607,9 @@ _asn1_create_errorDescription (int error, char *error_desc) switch (error) { + case ASN1_FILE_NOT_FOUND: + snprintf(error_desc, ASN1_MAX_ERROR_DESCRIPTION_SIZE, "%s file was not found", file_name); + break; case ASN1_SYNTAX_ERROR: strcpy(error_desc, last_error); break; diff --git a/src/asn1Parser.c b/src/asn1Parser.c index f19a9ef..64bf16b 100644 --- a/src/asn1Parser.c +++ b/src/asn1Parser.c @@ -174,7 +174,7 @@ main (int argc, char *argv[]) fputs ("Done.\n", stderr); break; case ASN1_FILE_NOT_FOUND: - fprintf (stderr, "asn1Parser: FILE %s NOT FOUND\n", + fprintf (stderr, "asn1Parser: file %s was not found\n", inputFileName); break; case ASN1_SYNTAX_ERROR: |