VirtualBox

Changeset 84054 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Apr 28, 2020 4:05:00 PM (5 years ago)
Author:
vboxsync
Message:

IPRT,++: Apply bldprog-strtab.h and friends to the IPRT status message database (errmsg.cpp) to reduce size. The interface (RTErrMsg*) has been reworked as we no longer have C-strings in the database, but 'compressed' string w/o zero terminators. bugref:9726

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestFileImpl.cpp

    r82968 r84054  
    403403}
    404404
    405 /* static */ const char *GuestFile::i_guestVrcToString(int rcGuest)
    406 {
    407     /** @todo pData->u32Flags: int vs. uint32 -- IPRT errors are *negative* !!! */
    408     switch (rcGuest)
    409     {
    410         case VERR_ACCESS_DENIED:        return tr("Access denied");
    411         case VERR_ALREADY_EXISTS:       return tr("File already exists");
    412         case VERR_FILE_NOT_FOUND:       return tr("File not found");
    413         case VERR_NET_HOST_NOT_FOUND:   return tr("Host name not found");
    414         case VERR_SHARING_VIOLATION:    return tr("Sharing violation");
    415         default:                        return RTErrGetDefine(rcGuest);
    416     }
    417 }
    418 
    419405/**
    420406 * @todo r=bird: This is an absolutely cryptic way of reporting errors.  You may convert
     
    429415{
    430416    /** @todo pData->u32Flags: int vs. uint32 -- IPRT errors are *negative* !!! */
    431     return i_guestVrcToString(rcGuest);
     417    switch (rcGuest)
     418    {
     419        case VERR_ACCESS_DENIED:        return tr("Access denied");
     420        case VERR_ALREADY_EXISTS:       return tr("File already exists");
     421        case VERR_FILE_NOT_FOUND:       return tr("File not found");
     422        case VERR_NET_HOST_NOT_FOUND:   return tr("Host name not found");
     423        case VERR_SHARING_VIOLATION:    return tr("Sharing violation");
     424        default:
     425        {
     426            char szDefine[80];
     427            RTErrQueryDefine(rcGuest, szDefine, sizeof(szDefine), false /*fFailIfUnknown*/);
     428            return &szDefine[0];
     429        }
     430    }
    432431}
    433432
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette