Diff

Differences From Artifact [f2454b481f]:

To Artifact [a33903368c]:


   222    222   		return;
   223    223   	}
   224    224   
   225    225   	return;
   226    226   }
   227    227   
   228    228   int TclKit_AppInit(Tcl_Interp *interp) {
          229  +#ifdef KIT_INCLUDES_TK
          230  +#  ifdef _WIN32
          231  +#    ifndef _WIN32_WCE
          232  +	char msgBuf[2049];
          233  +#    endif /* !_WIN32_WCE */
          234  +#  endif /* _WIN32 */
          235  +#endif /* KIT_INCLUDES_TK */
   229    236   #ifdef TCLKIT_CAN_SET_ENCODING
   230    237   	Tcl_DString encodingName;
   231         -#endif
          238  +#endif /* TCLKIT_CAN_SET_ENCODING */
   232    239   
   233    240   #ifdef KIT_INCLUDES_ITCL
   234    241   	Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL);
   235    242   #endif 
   236    243   #ifdef KIT_INCLUDES_MK4TCL
   237    244   	Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);
   238    245   #endif
................................................................................
   312    319   	return TCL_OK;
   313    320   
   314    321   error:
   315    322   #ifdef KIT_INCLUDES_TK
   316    323   #  ifdef _WIN32
   317    324   	MessageBeep(MB_ICONEXCLAMATION);
   318    325   #    ifndef _WIN32_WCE
   319         -	MessageBox(NULL, Tcl_GetStringResult(interp), "Error in TclKit",
   320         -	           MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
          326  +	snprintf(msgBuf, sizeof(msgBuf),
          327  +		"A critical error has occurred.  Please report this to the Tclkit vendor.\nInterpreter Returned: %s\nError Info: %s",
          328  +		Tcl_GetStringResult(interp),
          329  +		Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY));
          330  +
          331  +	MessageBox(NULL, msgBuf, "Error in TclKit",
          332  +		MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
   321    333   
   322    334   	ExitProcess(1);
   323    335   #    endif /* !_WIN32_WCE */
   324    336       /* we won't reach this, but we need the return */
   325    337   #  endif /* _WIN32 */
   326    338   #endif /* KIT_INCLUDES_TK */
   327    339   
   328    340   	return TCL_ERROR;
   329    341   }