Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8060


Ignore:
Timestamp:
06/20/12 10:33:10 (13 years ago)
Author:
ascheibe
Message:

#1174 fix failing InstantiateCreatablesTest

Location:
trunk/sources/HeuristicLab.Clients.OKB/3.3/RunCreation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.OKB/3.3/RunCreation/MissingClientRegistrationException.cs

    r8055 r8060  
    2424namespace HeuristicLab.Clients.OKB.RunCreation {
    2525  public class MissingClientRegistrationException : Exception {
    26     public MissingClientRegistrationException() : base("To be able to store runs, you need to register your client first.") { }
     26    public MissingClientRegistrationException()
     27      : base("To be able to store runs automatically, you need to register your client first." +
     28        Environment.NewLine + "To register your client, click on \"Services\" -> \"Access\" -> \"Client Information\".") { }
    2729  }
    2830}
  • trunk/sources/HeuristicLab.Clients.OKB/3.3/RunCreation/OKBAlgorithm.cs

    r8055 r8060  
    200200      runs = new RunCollection();
    201201      storeRunsAutomatically = true;
    202       CheckUserPermissions();
    203202      RegisterRunsEvents();
    204203    }
     
    251250    }
    252251    public void Start() {
     252      CheckUserPermissions();
    253253      if (!ClientInformation.Instance.ClientExists && storeRunsAutomatically) {
    254         throw new Exception("To be able to store runs automatically, you need to register your client first.");
     254        throw new MissingClientRegistrationException();
    255255      }
    256256      Algorithm.Start();
     
    405405          runs.Add(okbRun);
    406406          if (StoreRunsAutomatically) {
    407             try { okbRun.Store(); }
    408             catch (Exception) { }
     407            okbRun.Store();
    409408          }
    410409        } else {
Note: See TracChangeset for help on using the changeset viewer.