Changeset 83 for trunk


Ignore:
Timestamp:
Aug 4, 2017, 9:11:00 AM (7 years ago)
Author:
chronos
Message:
  • Added: Show meaningful error message if target compiler or executor doesn't exist.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r82 r83  
    55  Width = 860
    66  Caption = 'LazFuck'
    7   ClientHeight = 554
     7  ClientHeight = 561
    88  ClientWidth = 860
    99  Menu = MainMenu1
     
    1818    Left = 0
    1919    Height = 28
    20     Top = 526
     20    Top = 533
    2121    Width = 860
    2222    Panels = <   
     
    131131  object PageControlRight: TPageControl
    132132    Left = 467
    133     Height = 500
     133    Height = 507
    134134    Top = 26
    135135    Width = 393
     
    141141    object TabSheetDebug: TTabSheet
    142142      Caption = 'Debug'
    143       ClientHeight = 494
    144       ClientWidth = 319
     143      ClientHeight = 499
     144      ClientWidth = 359
    145145      object PanelInput: TPanel
    146146        Left = 0
    147147        Height = 64
    148148        Top = 0
    149         Width = 319
     149        Width = 359
    150150        Align = alTop
    151151        BevelOuter = bvNone
     
    157157        Height = 5
    158158        Top = 64
    159         Width = 319
     159        Width = 359
    160160        Align = alTop
    161161        ResizeAnchor = akTop
     
    165165        Height = 259
    166166        Top = 69
    167         Width = 319
     167        Width = 359
    168168        Align = alTop
    169169        BevelOuter = bvNone
     
    175175        Height = 5
    176176        Top = 328
    177         Width = 319
     177        Width = 359
    178178        Align = alTop
    179179        ResizeAnchor = akTop
     
    183183        Height = 86
    184184        Top = 333
    185         Width = 319
     185        Width = 359
    186186        Align = alTop
    187187        BevelOuter = bvNone
     
    193193        Height = 5
    194194        Top = 419
    195         Width = 319
     195        Width = 359
    196196        Align = alTop
    197197        ResizeAnchor = akTop
     
    199199      object PanelMemory: TPanel
    200200        Left = 0
    201         Height = 70
     201        Height = 75
    202202        Top = 424
    203         Width = 319
     203        Width = 359
    204204        Align = alClient
    205205        BevelOuter = bvNone
     
    210210  object Splitter1: TSplitter
    211211    Left = 462
    212     Height = 500
     212    Height = 507
    213213    Top = 26
    214214    Width = 5
     
    218218  object PanelLeft: TPanel
    219219    Left = 0
    220     Height = 500
     220    Height = 507
    221221    Top = 26
    222222    Width = 462
    223223    Align = alClient
    224224    BevelOuter = bvNone
    225     ClientHeight = 500
     225    ClientHeight = 507
    226226    ClientWidth = 462
    227227    TabOrder = 4
    228228    object PageControlMain: TPageControl
    229229      Left = 0
    230       Height = 377
     230      Height = 384
    231231      Top = 0
    232232      Width = 462
     
    246246      Left = 0
    247247      Height = 118
    248       Top = 382
     248      Top = 389
    249249      Width = 462
    250250      ActivePage = TabSheetMessages
     
    261261      Left = 0
    262262      Height = 5
    263       Top = 377
     263      Top = 384
    264264      Width = 462
    265265      Align = alBottom
  • trunk/Forms/UFormMain.pas

    r81 r83  
    183183  SDoYouWantToSaveProject = 'There are unsaved changes in project. Do you want to save them?';
    184184  SCloseProjectFirst = 'Project need to be closed before it can be openned';
     185  SError = 'Error';
    185186
    186187{ TFormMain }
     
    482483procedure TFormMain.AProgramCompileExecute(Sender: TObject);
    483484begin
    484   with Core.CurrentTarget do begin
     485  with Core.CurrentTarget do
     486  try
    485487    AProgramStop.Execute;
    486488    SourceCode := FormSourceCode.MemoSource.Text;
     
    492494    FormTargetCode.MemoTarget.Text := TargetCode;
    493495    UpdateInterface;
     496  except
     497    on E: Exception do
     498      MessageDlg(SError, E.Message, mtError, [mbOk], 0);
    494499  end;
    495500end;
  • trunk/Languages/LazFuck.cs.po

    r76 r83  
    99"MIME-Version: 1.0\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "X-Generator: Poedit 1.8.9\n"
     11"X-Generator: Poedit 1.8.8\n"
    1212"Language: cs\n"
    1313
     
    553553msgstr "V projektu Jsou neuloÅŸené změny. Chcete je uloÅŸit?"
    554554
     555#: uformmain.serror
     556msgid "Error"
     557msgstr "Chyba"
     558
    555559#: uformmain.snewproject
    556560msgid "New project"
     
    589593msgstr "Nenalezen překladač \"%s\""
    590594
     595#: utarget.sexecutornotfound
     596msgid "Executor \"%s\" not found"
     597msgstr "SpouÅ¡těč \"%s\" nenalezen"
     598
    591599#: utargetinterpretter.sjumptablecolision
    592600msgctxt "utargetinterpretter.sjumptablecolision"
     
    616624msgid "Unsupported command"
    617625msgstr "NepodporovanÃœ příkaz"
    618 
  • trunk/Languages/LazFuck.po

    r76 r83  
    504504msgstr ""
    505505
     506#: uformmain.serror
     507msgid "Error"
     508msgstr ""
     509
    506510#: uformmain.snewproject
    507511msgid "New project"
     
    536540msgstr ""
    537541
     542#: utarget.sexecutornotfound
     543msgid "Executor \"%s\" not found"
     544msgstr ""
     545
    538546#: utargetinterpretter.sjumptablecolision
    539547msgid "Jump table colision"
  • trunk/Languages/LazFuckIDE.po

    r76 r83  
    542542msgstr ""
    543543
     544#: uformmain.serror
     545msgid "Error"
     546msgstr ""
     547
    544548#: uformmain.snewproject
    545549msgid "New project"
     
    578582msgstr ""
    579583
     584#: utarget.sexecutornotfound
     585msgid "Executor \"%s\" not found"
     586msgstr ""
     587
    580588#: utargetinterpretter.sjumptablecolision
    581589msgctxt "utargetinterpretter.sjumptablecolision"
  • trunk/UTarget.pas

    r72 r83  
    144144resourcestring
    145145  SCompilerNotFound = 'Compiler "%s" not found';
     146  SExecutorNotFound = 'Executor "%s" not found';
    146147  SCompiledFileNotFound = 'Program compiled file "%s" not found';
    147148
     
    420421    Free;
    421422  end;
    422   if CompilerPath <> '' then begin
    423     if FileExistsUTF8(CompilerPath) then
     423  if FileExistsUTF8(CompilerPath) then
    424424    try
    425425      Process := TProcess.Create(nil);
     
    441441      Process.Free;
    442442    end else raise Exception.Create(Format(SCompilerNotFound, [CompilerPath]));
    443   end;
    444443end;
    445444
     
    456455    'compiled' + DirectorySeparator + Name + DirectorySeparator +
    457456    ExtractFileNameOnly(ProjectFileName) + RunExtension;
     457  if not FileExistsUTF8(ExecutorPath) then
     458    raise Exception.Create(Format(SExecutorNotFound, [ExecutorPath]));
    458459  if FileExistsUTF8(CompiledFile) then
    459460  try
Note: See TracChangeset for help on using the changeset viewer.