Fix for 89720 -- attempt to display meaningful text messages during install if system error is received. sr=sfraser, a=asa

This commit is contained in:
syd%netscape.com 2002-03-20 23:15:55 +00:00
Родитель f0042bf1dc
Коммит 4d7f68766a
12 изменённых файлов: 269 добавлений и 82 удалений

Просмотреть файл

@ -76,3 +76,81 @@ instErrSpawn=Thread spawn failed
instErrMenuHdl=Could not obtain menu handle
instErrCfgRead=Config file read failed
instErrDownload=Download failed!
[System Errors]
-27=IO call aborted by KillIO
-27=IO abort error (Printing Manager)
-28=Couldn't rd/wr/ctl/sts cause driver not opened
-29=unit table has no more entries
-30=dce extension error
-360=invalid slot # error
-400=gcr format on high density media error
-33=Directory full
-34=disk full
-35=no such volume
-36=I/O error (bummers)
-37=there may be no bad names in the final system!
-38=File not open
-39=End of file
-40=tried to position to before start of file (r/w)
-41=memory full (open) or file won't fit (load)
-42=too many files open
-43=File not found
-44=diskette is write protected.
-45=file is locked
-46=volume is locked
-47=File is busy (delete)
-48=duplicate filename (rename)
-49=file already open with with write permission
-51=refnum error
-52=get file position error
-53=volume not on line error (was Ejected)
-54=permissions error (on file open)
-55=drive volume already on-line at MountVol
-56=no such drive (tried to mount a bad drive num)
-57=not a mac diskette (sig bytes are wrong)
-58=volume in question belongs to an external fs
-59=file system internal error:during rename the old entry was deleted but could not be restored.
-60=bad master directory block
-61=write permissions error
-120=Directory not found
-121=No free WDCB available
-122=Move into offspring error
-123=Wrong volume type error [operation not supported for MFS]
-124=Server volume has been disconnected.
-1300=no file thread exists.
-1301=file id already exists
-1302=directory specified
-2800=The first value in the range of CFM errors.
-2800=The context ID was not valid.
-2801=The connection ID was not valid.
-2802=The specified symbol was not found.
-2803=The specified section was not found.
-2804=The named library was not found.
-2805=The registration name was already in use.
-2806=A fragment's container format is unknown.
-2807=A fragment had \hard\ unresolved imports.
-2808=The registration insertion point was not found.
-2809=Out of memory for internal bookkeeping.
-2810=Out of memory for fragment mapping or section instances.
-2811=No more CFM IDs for contexts, connections, etc.
-2813=An import library was too old for a client.
-2814=An import library was too new for a client.
-2815=Circularity in required initialization order.
-2816=A boot library has an initialization function. (System 7 only)
-2818=Internal error during CFM initialization.
-2819=An internal inconstistancy has been detected.
-2820=A fragment's container was corrupt (known format).
-2821=A fragment's initialization routine returned an error.
-2822=No application member found in the cfrg resource.
-2823=A fragment has an unacceptable architecture.
-2824=A semantic error in usage of the fragment.
-2825=A file was too large to be mapped.
-2826=The closure ID was actually a connection ID.
-2827=The registration name was not found.
-2828=The fragment container ID was not valid.
-2829=The closure ID was not valid.
-2830=Used by notification handlers to abort a closure.
-2831=An output parameter is too small to hold the value.
-2899=The last value in the range of CFM errors.

Просмотреть файл

@ -68,14 +68,14 @@ ShowAdditionsWin(void)
}
else
{
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
return;
}
gControls->aw->compDescBox = NULL;
gControls->aw->compDescBox = GetNewControl(rCompDescBox, gWPtr);
if (!gControls->aw->compDescBox)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}

Просмотреть файл

@ -68,14 +68,14 @@ ShowComponentsWin(void)
}
else
{
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
return;
}
gControls->cw->compDescBox = NULL;
gControls->cw->compDescBox = GetNewControl(rCompDescBox, gWPtr);
if (!gControls->cw->compDescBox)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}

Просмотреть файл

@ -76,7 +76,7 @@ pascal void* Install(void* unused)
err = FSpDirCreate(&tmpSpec, smSystemScript, &dirID);
if (err != noErr)
{
ErrorHandler(err);
ErrorHandler(err, nil);
return (void*)0;
}
}
@ -85,7 +85,7 @@ pascal void* Install(void* unused)
err = FSpGetDirectoryID( &tmpSpec, &dirID, &isDir );
if (!isDir || err!=noErr)
{
ErrorHandler(err);
ErrorHandler(err, nil);
return (void*)0;
}
}
@ -94,7 +94,7 @@ pascal void* Install(void* unused)
err = GetCWD(&srcDirID, &srcVRefNum);
if (err != noErr)
{
ErrorHandler(err);
ErrorHandler(err, nil);
return (void*)nil;
}
@ -138,7 +138,7 @@ pascal void* Install(void* unused)
}
if (dlErr != 0)
{
ErrorHandler(dlErr);
ErrorHandler(dlErr, nil);
return (void*) nil;
}
ClearDLProgControls(false);
@ -187,7 +187,7 @@ pascal void* Install(void* unused)
err = ExtractCoreFile(srcVRefNum, srcDirID, vRefNum, dirID);
if (err!=noErr)
{
ErrorHandler(err);
ErrorHandler(err, nil);
if (coreFile)
DisposePtr((Ptr)coreFile);
return (void*) nil;
@ -196,7 +196,7 @@ pascal void* Install(void* unused)
/* run all .xpi's through XPInstall */
err = RunAllXPIs(srcVRefNum, srcDirID, vRefNum, dirID);
if (err!=noErr)
ErrorHandler(err);
ErrorHandler(err, nil);
CleanupExtractedFiles(vRefNum, dirID);
}
@ -331,7 +331,7 @@ TRY_DOWNLOAD:
if (++currGlobalURLIndex < gControls->cfg->numGlobalURLs)
goto TRY_DOWNLOAD;
ErrorHandler(rv);
ErrorHandler(rv, nil);
break;
} else
currGlobalURLIndex = 0;
@ -360,7 +360,7 @@ TRY_DOWNLOAD:
CheckConn( "", TYPE_UNDEF, &myConn, true );
if ( crcPass >= MAXCRC ) {
ErrorHandler( eDownload ); // XXX need a better error message here
ErrorHandler( eDownload, nil ); // XXX need a better error message here
rv = eDownload;
}
@ -1095,13 +1095,13 @@ GenerateIDIFromOpt(Str255 idiName, long dirID, short vRefNum, FSSpec *idiSpec)
err = FSMakeFSSpec(vRefNum, dirID, idiName, idiSpec);
if ((err != noErr) && (err != fnfErr))
{
ErrorHandler(err);
ErrorHandler(err, nil);
return false;
}
err = FSpCreate(idiSpec, 'NSCP', 'TEXT', smSystemScript);
if ( (err != noErr) && (err != dupFNErr))
{
ErrorHandler(err);
ErrorHandler(err, nil);
return false;
}
ERR_CHECK_RET(FSpOpenDF(idiSpec, fsRdWrPerm, &refNum), false);

Просмотреть файл

@ -66,7 +66,7 @@ ShowLicenseWin(void)
}
else
{
ErrorHandler(eParam);
ErrorHandler(eParam, nil);
return;
}
InitLicTxt();
@ -120,7 +120,7 @@ InitLicTxt(void)
{
if (!(text = NewHandle(dataSize)))
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
ERR_CHECK(FSRead(dataRef, &dataSize, *text));
@ -226,7 +226,7 @@ ShowLogo(Boolean bEraseRect)
ControlHandle imgWellH = GetNewControl(rLogoImgWell, gWPtr);
if (!imgWellH)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -265,7 +265,7 @@ ShowLogo(Boolean bEraseRect)
}
if (reserr != noErr)
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
}
void
@ -389,7 +389,7 @@ InitScrollBar(ControlHandle sb)
currTE = gControls->lw->licTxt;
break;
default:
ErrorHandler(eUnknownDlgID);
ErrorHandler(eUnknownDlgID, nil);
break;
}
@ -417,7 +417,7 @@ DoScrollProc(ControlHandle theControl, short part)
te = *(gControls->lw->licTxt);
break;
default:
ErrorHandler(eUnknownDlgID);
ErrorHandler(eUnknownDlgID, nil);
break;
}

Просмотреть файл

@ -33,6 +33,9 @@ short gCurrWin = 0;
InstWiz *gControls = NULL;
InstINIRes *gStrings = NULL;
Boolean gInstallStarted = false;
ErrTableEnt *gErrTable = NULL;
short gErrTableSize = 0;
/*-----------------------------------------------------------*
@ -69,7 +72,7 @@ VerifyEnv(void)
if (err != noErr)
{
// errors already! we are bailing
ErrorHandler(err);
ErrorHandler(err, nil);
bEnvOK = false;
}
@ -156,7 +159,7 @@ InitOptObject(void)
if (!gControls->opt)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -165,7 +168,7 @@ InitOptObject(void)
gControls->opt->folder = (unsigned char *)NewPtrClear(64*sizeof(unsigned char));
if (!gControls->opt->folder)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -186,7 +189,7 @@ InitControlsObject(void)
gControls = (InstWiz *) NewPtrClear(sizeof(InstWiz));
if (!gControls)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -200,7 +203,7 @@ InitControlsObject(void)
if (!gControls->lw || !gControls->ww || !gControls->stw ||
!gControls->cw || !gControls->tw)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
}
gControls->state = eInstallNotStarted;
@ -358,7 +361,7 @@ void MakeMenus(void)
if ( !(mbarHdl = GetNewMBar( rMBar)) )
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -369,7 +372,7 @@ void MakeMenus(void)
AppendResMenu(menuHdl, 'DRVR');
}
else
ErrorHandler(eMenuHdl);
ErrorHandler(eMenuHdl, nil);
ERR_CHECK(HMGetHelpMenuHandle(&menuHdl));
DisableItem(menuHdl, 1);
@ -432,13 +435,13 @@ void MainEventLoopPass()
}
}
void ErrorHandler(short errCode)
void ErrorHandler(short errCode, Str255 msg)
{
// TO DO
// * handle a "fatality" parameter for recovery
Str255 pErrorStr;
Str255 pMessage;
Str255 pMessage, errMsg;
char *cErrNo = 0;
StringPtr pErrNo = 0;
AlertStdAlertParamRec *alertdlg;
@ -477,7 +480,14 @@ void ErrorHandler(short errCode)
else
{
GetResourcedString(pMessage, rErrorList, eErr3);
pstrcat(pMessage, pErrNo);
if ( LookupErrorMsg( errCode, errMsg ) == true )
pstrcat(pMessage, errMsg);
else
pstrcat(pMessage, pErrNo);
if ( msg[0] != 0 ) {
pstrcat(pMessage, "\p : ");
pstrcat(pMessage, msg);
}
}
alertdlg = (AlertStdAlertParamRec *)NewPtrClear(sizeof(AlertStdAlertParamRec));
@ -485,7 +495,7 @@ void ErrorHandler(short errCode)
alertdlg->defaultText = (ConstStringPtr)NewPtrClear(kKeyMaxLen);
GetResourcedString((unsigned char *)alertdlg->defaultText, rInstList, sOKBtn);
StandardAlert(kAlertStopAlert, pMessage, nil, alertdlg, 0);
SysBeep(10);
SysBeep(10);
if (cErrNo)
free(cErrNo);
@ -495,6 +505,23 @@ void ErrorHandler(short errCode)
gDone = true;
}
Boolean
LookupErrorMsg( short code, Str255 msg )
{
int i;
Boolean retval = false;
msg[0] = 1; msg[1] = ' ';
for ( i = 0; i < gErrTableSize; i++ ) {
if ( gErrTable[i].num == code ) {
pstrcat( msg, gErrTable[i].msg );
retval = true;
break;
}
}
return( retval );
}
void Shutdown(void)
{
WindowPtr frontWin;

Просмотреть файл

@ -63,7 +63,15 @@
err = _funcCall; \
if (err) \
{ \
ErrorHandler(err); \
ErrorHandler(err, nil); \
return; \
}
#define ERR_CHECK_MSG(_funcCall, _rv, _msg) \
err = _funcCall; \
if (err) \
{ \
ErrorHandler(err, _msg); \
return; \
}
@ -71,7 +79,7 @@ if (err) \
err = _funcCall; \
if (err) \
{ \
ErrorHandler(err); \
ErrorHandler(err, nil); \
return _rv; \
}
@ -403,6 +411,12 @@ typedef struct XPISpec {
struct XPISpec *next;
} XPISpec;
typedef struct _errTableEnt {
short num;
Str255 msg;
} ErrTableEnt;
typedef struct InstComp {
/* descriptions */
Handle shortDesc;
@ -669,7 +683,8 @@ void MakeMenus(void);
void MainEventLoop(void);
void MainEventLoopPass();
int BreathFunc();
void ErrorHandler(short);
void ErrorHandler(short, Str255);
Boolean LookupErrorMsg( short code, Str255 msg );
void Shutdown(void);
/*-----------------------------------------------------------*
@ -702,6 +717,8 @@ Boolean GetNextKeyVal(char **, char *, char*);
unsigned char *CToPascal(char *);
char * PascalToC(unsigned char *);
void CopyPascalStrToC(ConstStr255Param srcPString, char* dest);
OSErr ReadSystemErrors(const char *instText);
/*-----------------------------------------------------------*
* EvtHandlers

Просмотреть файл

@ -37,13 +37,13 @@ ParseConfig(void)
if(!gControls->cfg)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
if (!ReadINIFile(sConfigFName, &cfgText))
{
ErrorHandler(eCfgRead);
ErrorHandler(eCfgRead, nil);
return;
}
@ -72,18 +72,20 @@ ParseInstall(void)
if(!gStrings)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
if (!ReadINIFile(sInstallFName, &instText))
{
ErrorHandler(eInstRead);
ErrorHandler(eInstRead, nil);
return;
}
ERR_CHECK(PopulateInstallKeys(instText));
ERR_CHECK(ReadSystemErrors(instText));
if (instText)
DisposePtr(instText);
}
@ -123,7 +125,7 @@ ReadINIFile(int sINIFName, char **text)
*text = (char*) NewPtrClear(dataSize + 1); // ensure null termination
if (!(*text))
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return false;
}
@ -150,7 +152,7 @@ PopulateInstallKeys(char *instText)
tmp = NewHandleClear(kValueMaxLen);
if (!tmp)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
@ -176,6 +178,71 @@ PopulateInstallKeys(char *instText)
return err;
}
#define kSystemErrors "System Errors"
OSErr
ReadSystemErrors(const char *cfg)
{
char *sectionName, *section, *key, *cfgPtr[1], *sectionPtr[1];
char *value, *outValue;
extern short gErrTableSize;
unsigned char *pStr255;
extern ErrTableEnt *gErrTable;
OSErr ret = noErr;
*cfgPtr = (char*) cfg;
value = (char*) calloc(kValueMaxLen, sizeof( char ) );
outValue = (char*) calloc(kValueMaxLen, sizeof( char ) );
sectionName = (char *) calloc( kSNameMaxLen, sizeof( char ) );
section = (char *) calloc( kSectionMaxLen, sizeof( char ) );
key = (char *) calloc( kKeyMaxLen, sizeof( char ) );
if (!sectionName || !section || !key || !value || !outValue)
{
ErrorHandler(eMem, nil);
ret = eParseFailed;
}
else {
/* find next section [cfgPtr moved past next section per iteration] */
while(GetNextSection(cfgPtr, sectionName, section))
{
if (strncmp(sectionName, kSystemErrors, strlen(kSystemErrors)) == 0)
{
*sectionPtr = section;
/* find next key [sectionPtr moved past next key per iteration] */
while(GetNextKeyVal(sectionPtr, key, outValue))
{
gErrTable = (ErrTableEnt *) realloc( gErrTable, (gErrTableSize + 1) * sizeof( ErrTableEnt ) );
if ( gErrTable != NULL ) {
gErrTable[gErrTableSize].num = atoi(key);
pStr255 = CToPascal(outValue);
if ( pStr255 ) {
BlockMoveData(&pStr255[0], &gErrTable[gErrTableSize++].msg[0], pStr255[0] + 1);
DisposePtr((char *) pStr255);
}
}
}
}
}
}
if(key)
free(key);
if(sectionName)
free(sectionName);
if(section)
free(section);
if(value)
free(value);
if(outValue)
free(outValue);
return ret;
}
OSErr
PopulateGeneralKeys(char *cfgText)
{
@ -188,7 +255,7 @@ PopulateGeneralKeys(char *cfgText)
gControls->cfg->targetSubfolder = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->targetSubfolder)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
@ -206,7 +273,7 @@ PopulateGeneralKeys(char *cfgText)
gControls->cfg->globalURL[i] = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->globalURL[i])
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
@ -230,7 +297,7 @@ PopulateLicWinKeys(char *cfgText)
gControls->cfg->licFileName = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->licFileName)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
@ -249,20 +316,20 @@ PopulateWelcWinKeys(char *cfgText)
gControls->cfg->welcMsg[0] = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->welcMsg[0])
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
if (!FillKeyValueUsingResID(sWelcDlg, sMsg0, gControls->cfg->welcMsg[0], cfgText))
{
ErrorHandler(eParseFailed);
ErrorHandler(eParseFailed, nil);
return eParseFailed;
}
gControls->cfg->welcMsg[1] = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->welcMsg[1])
{
ErrorHandler(eParseFailed);
ErrorHandler(eParseFailed, nil);
return eParseFailed;
}
@ -271,7 +338,7 @@ PopulateWelcWinKeys(char *cfgText)
gControls->cfg->welcMsg[2] = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->welcMsg[2])
{
ErrorHandler(eParseFailed);
ErrorHandler(eParseFailed, nil);
return eParseFailed;
}
@ -287,7 +354,7 @@ PopulateWelcWinKeys(char *cfgText)
gControls->cfg->readmeFile = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->readmeFile)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
if (FillKeyValueUsingResID(sWelcDlg, sReadmeFilename, gControls->cfg->readmeFile, cfgText))
@ -300,13 +367,13 @@ PopulateWelcWinKeys(char *cfgText)
gControls->cfg->readmeApp = NewHandleClear(kValueMaxLen);
if (!gControls->cfg->readmeApp)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
if (!FillKeyValueUsingResID(sWelcDlg, sReadmeApp, gControls->cfg->readmeApp, cfgText))
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return eParseFailed;
}
}
@ -1062,7 +1129,7 @@ FillKeyValueUsingName(char *sectionName, char *keyName, Handle dest, char *cfgTe
value = (char*) NewPtrClear(kValueMaxLen);
if (!value)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return false;
}
@ -1075,7 +1142,7 @@ FillKeyValueUsingName(char *sectionName, char *keyName, Handle dest, char *cfgTe
err = MemError();
if (err != noErr)
{
ErrorHandler(err);
ErrorHandler(err, nil);
return false;
}
@ -1103,7 +1170,7 @@ FindKeyValue(const char *cfg, const char *inSectionName, const char *inKey, char
key = (char *) NewPtrClear( kKeyMaxLen );
if (!sectionName || !section || !key)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return false;
}
@ -1140,6 +1207,7 @@ FindKeyValue(const char *cfg, const char *inSectionName, const char *inKey, char
return false;
}
Boolean
GetNextSection(char **ioTxt, char *outSectionName, char *outSection)
{
@ -1311,7 +1379,6 @@ GetNextKeyVal(char **inSection, char *outKey, char *outVal)
*/
unsigned char *CToPascal(char *str)
{
register char *p,*q;
long len;
char* cpy;
@ -1319,12 +1386,11 @@ unsigned char *CToPascal(char *str)
cpy = (char*)NewPtrClear(len+1);
if (!cpy)
return 0;
strncpy(cpy, str, len);
if (len > 255) len = 255;
p = cpy + len;
q = p-1;
while (p != cpy) *p-- = *q--;
*cpy = len;
strncpy(&cpy[1], str, len);
if (len > 255)
cpy[0] = 255;
else
cpy[0] = len;
return((unsigned char *)cpy);
}

Просмотреть файл

@ -149,7 +149,7 @@ KeepCheckingVersion:
if (!gControls->stw->instType || !gControls->stw->instDescBox ||
!gControls->stw->destLocBox || !gControls->stw->destLoc)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -564,7 +564,7 @@ DrawDiskSpaceMsgs(short vRefNum)
reserr = ResError();
if (reserr!=noErr || !instDescRectH)
{
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
return;
}
@ -584,7 +584,7 @@ DrawDiskSpaceMsgs(short vRefNum)
dsAvailH = TENew(&viewRect, &viewRect);
if (!dsAvailH)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -627,7 +627,7 @@ DrawDiskSpaceMsgs(short vRefNum)
dsNeededH = TENew( &viewRect, &viewRect );
if (!dsNeededH)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -726,7 +726,7 @@ ClearDiskSpaceMsgs(void)
reserr = ResError();
if (reserr!=noErr || !instDescRectH)
{
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
return;
}

Просмотреть файл

@ -67,7 +67,7 @@ ShowTerminalWin(void)
}
else
{
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
return;
}
@ -79,7 +79,7 @@ ShowTerminalWin(void)
gControls->tw->startMsg = TENew(&viewRect, &viewRect);
if (gControls->tw->startMsg == NULL)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -120,7 +120,7 @@ ShowTerminalWin(void)
gControls->tw->siteSelector = GetNewControl( rSiteSelector, gWPtr );
if (!gControls->tw->siteSelector)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
@ -147,7 +147,7 @@ ShowTerminalWin(void)
gControls->tw->saveBitsCheckbox = GetNewControl( rSaveCheckbox, gWPtr );
if (!gControls->tw->saveBitsCheckbox)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
if (gControls->opt->saveBits)
@ -164,7 +164,7 @@ ShowTerminalWin(void)
}
else
{
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
return;
}
@ -173,7 +173,7 @@ ShowTerminalWin(void)
&gControls->tw->saveBitsMsgBox );
if (gControls->tw->saveBitsMsg == NULL)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
HLock(gControls->cfg->saveBitsMsg);
@ -188,7 +188,7 @@ ShowTerminalWin(void)
gControls->tw->proxySettingsBtn = GetNewControl(rProxySettgBtn, gWPtr);
if (!gControls->tw->proxySettingsBtn)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
Str255 proxySettingsTitle;
@ -231,7 +231,7 @@ GetRectFromRes(Rect *outRect, short inResID)
}
else
{
ErrorHandler(reserr);
ErrorHandler(reserr, nil);
return reserr;
}
@ -369,7 +369,7 @@ InTerminalContent(EventRecord* evt, WindowPtr wCurrPtr)
}
else
{
ErrorHandler(eParam);
ErrorHandler(eParam, nil);
return;
}
ClearSaveBitsMsg();

Просмотреть файл

@ -64,7 +64,7 @@ ShowWelcomeMsg(void)
gControls->ww->welcMsgCntl[i] = GetNewControl(rWelcMsgTextbox+i, gWPtr);
if (!gControls->ww->welcMsgCntl)
{
ErrorHandler(eMem);
ErrorHandler(eMem, nil);
return;
}
}

Просмотреть файл

@ -39,7 +39,7 @@ OSErr LoadXPIStub(XPI_InitProc* pfnInit,
XPI_InstallProc* pfnInstall,
XPI_ExitProc* pfnExit,
CFragConnectionID* connID,
FSSpec& aTargetDir);
FSSpec& aTargetDir, Str255 msg);
Boolean UnloadXPIStub(CFragConnectionID* connID);
OSErr RunXPI(FSSpec&, XPI_InstallProc*);
int CountSelectedXPIs();
@ -54,7 +54,7 @@ void xpicbProgress(const char* msg, PRInt32 val, PRInt32 max);
rv = _call; \
if (NS_FAILED(rv)) \
{ \
ErrorHandler(rv); \
ErrorHandler(rv, nil); \
return rv; \
}
@ -223,7 +223,7 @@ RunAllXPIs(short xpiVRefNum, long xpiDirID, short vRefNum, long dirID)
StringPtr pcurrArchive;
int i, len, compsDone = 0, numXPIs, currXPICount = 0, instChoice = gControls->opt->instChoice-1;
Boolean isCurrXPI = false, indeterminateFlag = false;
Str255 installingStr;
Str255 installingStr, msg;
StringPtr pTargetSubfolder = "\p"; /* subfolder is optional so init empty */
long dummyDirID = 0;
@ -242,11 +242,11 @@ RunAllXPIs(short xpiVRefNum, long xpiDirID, short vRefNum, long dirID)
if (err != noErr)
{
ErrorHandler(err);
ErrorHandler(err, nil);
return err;
}
ERR_CHECK_RET(LoadXPIStub(&xpi_initProc, &xpi_installProc, &xpi_exitProc, &connID, xpiStubDirSpec), err);
ERR_CHECK_MSG(LoadXPIStub(&xpi_initProc, &xpi_installProc, &xpi_exitProc, &connID, xpiStubDirSpec, msg), err, msg);
XPI_ERR_CHECK(xpi_initProc( xpiStubDirSpec, tgtDirSpec, NULL, xpicbProgress ));
// init overall xpi indicator
@ -388,13 +388,12 @@ CountSelectedXPIs()
*-------------------------------------------------------------------*/
OSErr
LoadXPIStub(XPI_InitProc* pfnInit, XPI_InstallProc* pfnInstall, XPI_ExitProc* pfnExit,
CFragConnectionID* connID, FSSpec& aTargetDir)
CFragConnectionID* connID, FSSpec& aTargetDir, Str255 errName)
{
OSErr err;
FSSpec fslib;
Str63 fragName = XPISTUB_DLL;
Ptr mainAddr, symAddr;
Str255 errName;
CFragSymbolClass symClass;
long tgtDirID;
Boolean isDir;