LazReport, formalize the hyphenation support exception and make the editor sample ignore it

git-svn-id: trunk@40652 -
This commit is contained in:
jesus 2013-03-27 21:28:59 +00:00
parent 2d47913308
commit 04a1a5d3f9
3 changed files with 13 additions and 3 deletions

View File

@ -121,4 +121,11 @@
</Other>
<CompileReasons Run="False"/>
</CompilerOptions>
<Debugging>
<Exceptions Count="1">
<Item1>
<Name Value="EHyphenationException"/>
</Item1>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -1764,7 +1764,7 @@ begin
try
FHyp.BreakWord('lazreport');
except
on E:Exception do
on E:EHyphenationException do
DebugLn('Error: ', e.message,'. Hyphenation support will be disabled');
end;
end;

View File

@ -42,6 +42,9 @@ const
MAX_CHARS = 100;
type
EHyphenationException = class(Exception);
PHyphenTrans = ^HyphenTrans;
HyphenTrans = record
ch: char;
@ -220,10 +223,10 @@ begin
result := '';
if not CheckLibrary then
raise Exception.Create('hyphen libarary not loaded');
raise EHyphenationException.Create('hyphen libarary not loaded');
if not CheckDictionary then
raise Exception.Create('hyphen dictionary not loaded');
raise EHyphenationException.Create('hyphen dictionary not loaded');
len := Length(word);
hyphens := StrAlloc(Len + 5);