Free cookie consent management tool by TermsFeed Policy Generator

Changeset 274


Ignore:
Timestamp:
05/29/08 18:14:22 (16 years ago)
Author:
gkronber
Message:

addition changeset (r273). added a warning dialog showing what was the problem while parsing if strict parsing fails.

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataAnalysis/DataFormatException.cs

    r273 r274  
    3535      get { return token; }
    3636    }
    37     private string message;
    38     public string Message {
    39       get { return message; }
    40     }
    41 
    42     public DataFormatException(string message, string token, int line) {
    43       this.message = message;
     37    public DataFormatException(string message, string token, int line) : base(message+"\nToken: " + token + " (line: " + line + ")"){
    4438      this.token = token;
    4539      this.line = line;
    4640    }
    47 
    48     public override string ToString() {
    49       return message + "\nToken: " + token + " (line: " + line + ")\n";
    50     }
    5141  }
    5242}
  • trunk/sources/HeuristicLab.DataAnalysis/DatasetView.cs

    r237 r274  
    7070          dataGridView.Columns[i].Name = GetColumnName(i);
    7171        }
    72         dataGridView.SelectionMode = DataGridViewSelectionMode.ColumnHeaderSelect;
     72        //dataGridView.SelectionMode = DataGridViewSelectionMode.ColumnHeaderSelect;
    7373      } else {
    7474        rowsTextBox.Text = "1";
  • trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjectorView.cs

    r273 r274  
    7777            parser.Import(openFileDialog.FileName, true);
    7878            success = true;
    79           } catch(DataFormatException) {
     79          } catch(DataFormatException ex) {
     80            ShowWarningMessageBox(ex);
    8081            // not possible to parse strictly => try to parse non-strict
    8182            parser.Import(openFileDialog.FileName, false);
     
    101102    }
    102103
     104    private void ShowWarningMessageBox(Exception ex) {
     105      MessageBox.Show(ex.Message,
     106                      "Warning - " + ex.GetType().Name,
     107                      MessageBoxButtons.OK,
     108                      MessageBoxIcon.Warning);
     109    }
    103110    private void ShowErrorMessageBox(Exception ex) {
    104111      MessageBox.Show(BuildErrorMessage(ex),
Note: See TracChangeset for help on using the changeset viewer.