Back to index

lightning-sunbird  0.9+nobinonly
Functions
WhatError.cpp File Reference
#include "nsError.h"
#include <stdlib.h>
#include <stdio.h>

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 The Xalan testcases app.

Function Documentation

int main ( int  argc,
char **  argv 
)

The Xalan testcases app.

Definition at line 43 of file WhatError.cpp.

{
    int errorCode = 0;
    char buffer[100];
    
    if (argc != 2)
        return -1;

    sscanf( argv[1], "0x%x", &errorCode);
    sprintf(buffer, "%d", errorCode);
    sscanf( buffer, "%d", &errorCode);
    
    printf( "Code: %d, Module: %d, Severity: %d\n", 
            NS_ERROR_GET_CODE(errorCode), 
            NS_ERROR_GET_MODULE(errorCode), 
            NS_ERROR_GET_SEVERITY(errorCode));

    return 0;
}

Here is the call graph for this function: