Introduced message severity "FAILURE"
This commit is contained in:
parent
3e8835cca0
commit
e7fa1a3e13
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2008.01.23.193345"
|
||||
#define Cdrskin_timestamP "2008.01.23.193843"
|
||||
|
@ -2046,8 +2046,8 @@ void burn_version(int *major, int *minor, int *micro);
|
||||
|
||||
/* ts A60924 : ticket 74 */
|
||||
/** Control queueing and stderr printing of messages from libburn.
|
||||
Severity may be one of "NEVER", "ABORT", "FATAL", "SORRY", "WARNING",
|
||||
"HINT", "NOTE", "UPDATE", "DEBUG", "ALL".
|
||||
Severity may be one of "NEVER", "ABORT", "FATAL", "FAILURE", "SORRY",
|
||||
"WARNING", "HINT", "NOTE", "UPDATE", "DEBUG", "ALL".
|
||||
@param queue_severity Gives the minimum limit for messages to be queued.
|
||||
Default: "NEVER". If you queue messages then you
|
||||
must consume them by burn_msgs_obtain().
|
||||
@ -2066,8 +2066,9 @@ int burn_msgs_set_severities(char *queue_severity,
|
||||
/** Obtain the oldest pending libburn message from the queue which has at
|
||||
least the given minimum_severity. This message and any older message of
|
||||
lower severity will get discarded from the queue and is then lost forever.
|
||||
@param minimum_severity may be one of "NEVER", "ABORT", "FATAL", "SORRY",
|
||||
"WARNING", "HINT", "NOTE", "UPDATE", "DEBUG", "ALL".
|
||||
@param minimum_severity may be one of "NEVER", "ABORT", "FATAL",
|
||||
"FAILURE", "SORRY", "WARNING", "HINT", "NOTE", "UPDATE",
|
||||
"DEBUG", "ALL".
|
||||
To call with minimum_severity "NEVER" will discard the
|
||||
whole queue.
|
||||
@param error_code Will become a unique error code as liste in
|
||||
@ -2093,8 +2094,8 @@ int burn_msgs_obtain(char *minimum_severity,
|
||||
message text.
|
||||
@param os_errno Eventual errno related to the message. Submit 0 if
|
||||
the message is not related to a operating system error.
|
||||
@param severity One of "ABORT", "FATAL", "SORRY", "WARNING", "HINT",
|
||||
"NOTE", "UPDATE", "DEBUG". Defaults to "FATAL".
|
||||
@param severity One of "ABORT", "FATAL", "FAILURE", "SORRY", "WARNING",
|
||||
"HINT", "NOTE", "UPDATE", "DEBUG". Defaults to "FATAL".
|
||||
@param d An eventual drive to which the message shall be related.
|
||||
Submit NULL if the message is not specific to a
|
||||
particular drive object.
|
||||
|
@ -252,6 +252,8 @@ int libdax_msgs__text_to_sev(char *severity_name, int *severity,
|
||||
*severity= LIBDAX_MSGS_SEV_ABORT;
|
||||
else if(strncmp(severity_name,"FATAL",5)==0)
|
||||
*severity= LIBDAX_MSGS_SEV_FATAL;
|
||||
else if(strncmp(severity_name,"FAILURE",7)==0)
|
||||
*severity= LIBDAX_MSGS_SEV_FAILURE;
|
||||
else if(strncmp(severity_name,"SORRY",5)==0)
|
||||
*severity= LIBDAX_MSGS_SEV_SORRY;
|
||||
else if(strncmp(severity_name,"WARNING",7)==0)
|
||||
@ -278,8 +280,7 @@ int libdax_msgs__sev_to_text(int severity, char **severity_name,
|
||||
int flag)
|
||||
{
|
||||
if(flag&1) {
|
||||
*severity_name=
|
||||
"NEVER\nABORT\nFATAL\nSORRY\nWARNING\nHINT\nNOTE\nUPDATE\nDEBUG\nALL";
|
||||
*severity_name= "NEVER\nABORT\nFATAL\nFAILURE\nSORRY\nWARNING\nHINT\nNOTE\nUPDATE\nDEBUG\nALL";
|
||||
return(1);
|
||||
}
|
||||
*severity_name= "";
|
||||
@ -289,6 +290,8 @@ int libdax_msgs__sev_to_text(int severity, char **severity_name,
|
||||
*severity_name= "ABORT";
|
||||
else if(severity>=LIBDAX_MSGS_SEV_FATAL)
|
||||
*severity_name= "FATAL";
|
||||
else if(severity>=LIBDAX_MSGS_SEV_FAILURE)
|
||||
*severity_name= "FAILURE";
|
||||
else if(severity>=LIBDAX_MSGS_SEV_SORRY)
|
||||
*severity_name= "SORRY";
|
||||
else if(severity>=LIBDAX_MSGS_SEV_WARNING)
|
||||
|
@ -140,15 +140,47 @@ struct libdax_msgs_item;
|
||||
*/
|
||||
#define LIBDAX_MSGS_SEV_WARNING 0x50000000
|
||||
|
||||
/** Non-fatal error messages indicating that parts of the action failed
|
||||
but processing will/should go on
|
||||
|
||||
/** Non-fatal error messages indicating that important parts of an action
|
||||
failed but processing may go on if one accepts deviations from the
|
||||
desired result.
|
||||
|
||||
E.g.: One of several libisofs input files cannot be found.
|
||||
A speed setting cannot be made.
|
||||
|
||||
After SORRY a function should try to go on if that makes any sense
|
||||
and if no threshold prescribes abort on SORRY. The function should
|
||||
nevertheless indicate some failure in its return value.
|
||||
It should - but it does not have to.
|
||||
*/
|
||||
#define LIBDAX_MSGS_SEV_SORRY 0x60000000
|
||||
|
||||
|
||||
/** Non-fatal error indicating that a complete action failed and that
|
||||
only a thorough new setup of preconditions will give hope for success.
|
||||
|
||||
E.g.: No media is inserted in the output drive.
|
||||
No write mode can be found for inserted media.
|
||||
All libisofs input files are inaccessible.
|
||||
|
||||
After FAILURE a function should end very soon with a return value
|
||||
indicating failure.
|
||||
*/
|
||||
#define LIBDAX_MSGS_SEV_FAILURE 0x68000000
|
||||
|
||||
|
||||
/** An error message which puts the whole operation of the program in question
|
||||
|
||||
E.g.: Not enough memory for essential temporary objects.
|
||||
Irregular errors from resources.
|
||||
Programming errors (soft assert).
|
||||
|
||||
After FATAL a function should end very soon with a return value
|
||||
indicating severe failure.
|
||||
*/
|
||||
#define LIBDAX_MSGS_SEV_FATAL 0x70000000
|
||||
|
||||
|
||||
/** A message from an abort handler which will finally finish libburn
|
||||
*/
|
||||
#define LIBDAX_MSGS_SEV_ABORT 0x71000000
|
||||
|
Loading…
Reference in New Issue
Block a user