* Added NoWideStringSupport runtime error

git-svn-id: trunk@10618 -
This commit is contained in:
joost 2008-04-08 21:19:52 +00:00
parent d20636a319
commit 1a4ee73146
4 changed files with 15 additions and 1 deletions

View File

@ -1959,10 +1959,20 @@ function UCS4StringToWideString(const s : UCS4String) : WideString;
setlength(result,resindex-1);
end;
const
SNoWidestrings = 'This binary has no widestrings support compiled in.';
SRecompileWithWidestrings = 'Recompile the application with a widestrings-manager in the program uses clause.';
procedure unimplementedwidestring;
begin
HandleErrorFrame(215,get_frame);
{$ifdef FPC_HAS_FEATURE_CONSOLEIO}
If IsConsole then
begin
Writeln(StdErr,SNoWidestrings);
Writeln(StdErr,SRecompileWithWidestrings);
end;
{$endif FPC_HAS_FEATURE_CONSOLEIO}
HandleErrorFrame(233,get_frame);
end;
{$warnings off}

View File

@ -75,6 +75,7 @@ resourcestring
SInvalidVarOpWithHResultWithPrefix = 'Invalid variant operation (%s%.8x)'+LineEnding+'%s';
SNoError = 'No error.';
SNoThreadSupport = 'Threads not supported. Recompile program with thread driver.';
SMissingWStringManager = 'Widestring manager not available. Recompile program with appropiate manager.';
SOSError = 'System error, (OS Code %d):'+LineEnding+'%s';
SOutOfMemory = 'Out of memory';
SOverflow = 'Floating point overflow';
@ -211,6 +212,7 @@ begin
230 : Result:=SSafecallException;
231 : Result:=SExceptionStack;
232 : Result:=SNoThreadSupport;
233 : Result:=SMissingWStringManager;
255 : Result:=SFallbackError;

View File

@ -159,6 +159,7 @@ type
ESafecallException = class(Exception);
ENoThreadSupport = Class(Exception);
ENoWideStringSupport = Class(Exception);
{ Exception handling routines }

View File

@ -312,6 +312,7 @@ begin
229 : E:=ESafecallException.Create(SSafecallException);
231 : E:=EConvertError.Create(SiconvError);
232 : E:=ENoThreadSupport.Create(SNoThreadSupport);
233 : E:=ENoWideStringSupport.Create(SMissingWStringManager);
else
E:=Exception.CreateFmt (SUnKnownRunTimeError,[Errno]);
end;