aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-23 12:16:36 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2010-04-23 12:16:36 +0000
commitc9a13f8923d1cc8798bcb07a0808855380d083c8 (patch)
tree41e8442e73bc38a7b809d536f17e7dea02b542ce
parent78b2bd7d0d408a7f8d679a4e97a0260900211fb6 (diff)
downloadusdx-c9a13f8923d1cc8798bcb07a0808855380d083c8.tar.gz
usdx-c9a13f8923d1cc8798bcb07a0808855380d083c8.tar.xz
usdx-c9a13f8923d1cc8798bcb07a0808855380d083c8.zip
reverted revision 2278
- Auto.inc: Log.LogError is not possible as ULog is not loaded at this point -> used ConsoleWriteLn instead git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2279 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--src/base/UTextEncoding.pas1
-rw-r--r--src/encoding/Auto.inc10
2 files changed, 7 insertions, 4 deletions
diff --git a/src/base/UTextEncoding.pas b/src/base/UTextEncoding.pas
index 148cd5d4..0c9ba4cc 100644
--- a/src/base/UTextEncoding.pas
+++ b/src/base/UTextEncoding.pas
@@ -92,6 +92,7 @@ implementation
uses
StrUtils,
pcre,
+ UCommon,
ULog;
type
diff --git a/src/encoding/Auto.inc b/src/encoding/Auto.inc
index 487e2e42..8c32b5d0 100644
--- a/src/encoding/Auto.inc
+++ b/src/encoding/Auto.inc
@@ -69,7 +69,6 @@ var
Error: PChar;
ErrorOffset: Integer;
begin
- // NOTICE: Log.LogError() is not possible here because it isn't loaded
inherited Create();
self.FallbackEncoder := FallbackEncoder;
self.UTF8Encoder := UTF8Encoder;
@@ -82,7 +81,8 @@ begin
if self.Regex = Nil then
begin
- Log.LogError ('UTF8 Regex compilation failed: ' + AnsiString(Error) + ' at ' + IntToStr(ErrorOffset), 'EncoderAuto.Create');
+ // NOTICE: Log.LogError() is not possible here because it isn't loaded
+ ConsoleWriteLn(Format('ERROR: UTF8 Regex compilation failed: %s at %d', [Error, ErrorOffset]));
end
else
begin
@@ -91,13 +91,15 @@ begin
if Error <> Nil then
begin
- Log.LogError ('UTF8 regex study failed: ' + AnsiString(Error), 'EncoderAuto.Create');
+ // NOTICE: Log.LogError() is not possible here because it isn't loaded
+ ConsoleWriteLn('ERROR: UTF8 Regex study failed: ' + Error);
end;
end;
end
else
begin
- Log.LogError ('pcre not loaded. utf-8 autodetection will not work.', 'EncoderAuto.Create');
+ // NOTICE: Log.LogError() is not possible here because it isn't loaded
+ ConsoleWriteLn('ERROR: pcre not loaded. utf-8 autodetection will not work.');
end;
end;