Skip to content

Commit 778991f

Browse files
exception output
1 parent 24f5494 commit 778991f

16 files changed

+96
-33
lines changed

DokuExtractorCore/TemplateProcessor.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public List<DocumentGroupTemplate> LoadGroupTemplatesFromDisk()
5959
}
6060
catch (Exception ex)
6161
{
62-
62+
Console.WriteLine(ex.Message);
6363
throw;
6464
}
6565
}
@@ -83,7 +83,7 @@ public List<DocumentClassTemplate> LoadClassTemplatesFromDisk()
8383
}
8484
catch (Exception ex)
8585
{
86-
86+
Console.WriteLine(ex.Message);
8787
throw;
8888
}
8989
}
@@ -203,7 +203,7 @@ public bool SaveTemplateToFile(DocumentClassTemplate template, string templateDi
203203
}
204204

205205
/// <summary>
206-
/// Can be called to prepare modified class templates for being saved externally. Takes care removing double blank spaces in <see cref="DocumentClassTemplate.KeyWords"/>.
206+
/// Can be called to prepare modified class templates for being saved externally. Takes care removing double blank spaces in <see cref="DocumentBaseTemplate.KeyWords"/>.
207207
/// Will be called automatically if the template is saved by the internally provided methods. (<see cref="SaveTemplateToFile(DocumentClassTemplate, string)"/>) and its derivates.
208208
/// </summary>
209209
/// <param name="template"></param>
@@ -231,6 +231,7 @@ public bool DeleteTemplateFile(DocumentClassTemplate template)
231231
}
232232
catch (Exception ex)
233233
{
234+
Console.WriteLine(ex.Message);
234235
return false;
235236
}
236237
}
@@ -255,6 +256,7 @@ public bool DeleteTemplateFile(DocumentGroupTemplate template)
255256
}
256257
catch (Exception ex)
257258
{
259+
Console.WriteLine(ex.Message);
258260
return false;
259261
}
260262
}
@@ -319,6 +321,7 @@ public DocumentGroupTemplate GetDocumentGroupTemplateByName(string groupName, Li
319321
/// <param name="template">The class template to be used</param>
320322
/// <param name="groupTemplates">Available group templates. The correct group template for the given class template will be selected automatically. If it is the correct one, it's okay if only one group template is in the list.</param>
321323
/// <param name="inputText"></param>
324+
/// <param name="pdfFilePath"></param>
322325
/// <returns></returns>
323326
public async Task<FieldExtractionResult> ExtractData(DocumentClassTemplate template, List<DocumentGroupTemplate> groupTemplates, string inputText, string pdfFilePath)
324327
{
@@ -386,11 +389,12 @@ public async Task<FieldExtractionResult> ExtractData(DocumentClassTemplate templ
386389
}
387390

388391
/// <summary>
389-
/// Returns extracted data from <see cref=" ExtractData(DocumentClassTemplate, List{DocumentGroupTemplate}, string)"/> as JSON text.
392+
/// Returns extracted data from <see cref=" ExtractData(DocumentClassTemplate, List{DocumentGroupTemplate}, string, string)"/> as JSON text.
390393
/// </summary>
391394
/// <param name="template"></param>
392395
/// <param name="groupTemplates"></param>
393396
/// <param name="inputText"></param>
397+
/// <param name="pdfFilePath"></param>
394398
/// <returns></returns>
395399
public async Task<string> ExtractDataAsJson(DocumentClassTemplate template, List<DocumentGroupTemplate> groupTemplates, string inputText, string pdfFilePath)
396400
{

DokuExtractorStandardGUI/Localization/Translation.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public static void LoadLanguageFile(CultureInfo culture, string additionalCultur
4040
}
4141
}
4242
catch (Exception ex)
43-
{ }
43+
{
44+
Console.WriteLine(ex.Message);
45+
}
4446
}
4547

4648
public static List<LanguageStrings> LoadAllLanguageFiles(string languageFolderPath)
@@ -59,7 +61,9 @@ public static List<LanguageStrings> LoadAllLanguageFiles(string languageFolderPa
5961
}
6062
}
6163
catch (Exception ex)
62-
{ }
64+
{
65+
Console.WriteLine(ex.Message);
66+
}
6367

6468
return retVal;
6569
}

DokuExtractorStandardGUI/UserControls/ucExtractedCalculationFields.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ public void ShowExtractedCalculationFields(List<CalculationFieldResult> extracte
6767
}
6868
}
6969
catch (Exception ex)
70-
{ }
70+
{
71+
Console.WriteLine(ex.Message);
72+
}
7173
}
7274
}
7375

DokuExtractorStandardGUI/UserControls/ucExtractedConditionalFields.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ public void ShowExtractedConditionalFields(List<ConditionalFieldResult> extracte
7373
}
7474
}
7575
catch (Exception ex)
76-
{ }
76+
{
77+
Console.WriteLine(ex.Message);
78+
}
7779
}
7880
}
7981

@@ -202,7 +204,9 @@ protected virtual void OnDgvConditionalFieldCellClick(object sender, DataGridVie
202204
}
203205
}
204206
catch (Exception ex)
205-
{ }
207+
{
208+
Console.WriteLine(ex.Message);
209+
}
206210
}
207211
else
208212
{
@@ -211,7 +215,9 @@ protected virtual void OnDgvConditionalFieldCellClick(object sender, DataGridVie
211215
OnDgvConditionalFieldCellDoubleClick(sender, new DataGridViewCellEventArgs(colIndex, e.RowIndex));
212216
}
213217
catch (Exception ex)
214-
{ }
218+
{
219+
Console.WriteLine(ex.Message);
220+
}
215221
}
216222
}
217223
}
@@ -278,7 +284,9 @@ private void dgvConditionalFields_CellValueChanged(object sender, DataGridViewCe
278284
}
279285
}
280286
catch (Exception ex)
281-
{ }
287+
{
288+
Console.WriteLine(ex.Message);
289+
}
282290
}
283291
}
284292
}

DokuExtractorStandardGUI/UserControls/ucExtractedDataFields.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public void ShowExtractedDataFields(List<DataFieldResult> extractedDataFields)
6060
}
6161
}
6262
catch (Exception ex)
63-
{ }
63+
{
64+
Console.WriteLine(ex.Message);
65+
}
6466
}
6567
}
6668

@@ -132,7 +134,9 @@ private void dgvDataFields_CellValueChanged(object sender, DataGridViewCellEvent
132134
}
133135
}
134136
catch (Exception ex)
135-
{ }
137+
{
138+
Console.WriteLine(ex.Message);
139+
}
136140
}
137141
}
138142
}

DokuExtractorStandardGUI/UserControls/ucFileSelector.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public async Task DeleteFile(string filePath)
9494
}
9595
catch (Exception e)
9696
{
97+
Console.WriteLine(e.Message);
9798
retryCounter++;
9899
}
99100
}
@@ -156,7 +157,9 @@ private void dataGridView1_MouseMove(object sender, MouseEventArgs e)
156157
DoDragDrop(dragDropDaten, DragDropEffects.Copy);
157158
}
158159
catch (Exception ex)
159-
{ }
160+
{
161+
Console.WriteLine(ex.Message);
162+
}
160163

161164
break;
162165
}

DokuExtractorStandardGUI/UserControls/ucViewer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public ucViewer()
3535
LoadViewerPlugin(UserControlSelector.ViewerPluginPath);
3636
}
3737
catch (Exception ex)
38-
{ }
38+
{
39+
Console.WriteLine(ex.Message);
40+
}
3941
}
4042

4143
private void ucViewer_Load(object sender, EventArgs e)

DokuExtractorStandardGUI/UserControlsTemplateEditor/ucCalculationFieldGroupTemplate.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ private void butDeleteCalculationField_Click(object sender, EventArgs e)
113113
FireCalculationFieldEraser(id);
114114
}
115115
catch (Exception ex)
116-
{ }
116+
{
117+
Console.WriteLine(ex.Message);
118+
}
117119
}
118120

119121
private void FireCalculationFieldEraser(Guid id)

DokuExtractorStandardGUI/UserControlsTemplateEditor/ucConditionalFieldTemplate.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ private void butDeleteConditionalField_Click(object sender, EventArgs e)
206206
FireConditionalFieldEraser(id);
207207
}
208208
catch (Exception ex)
209-
{ }
209+
{
210+
Console.WriteLine(ex.Message);
211+
}
210212
}
211213

212214
private void FireConditionalFieldEraser(Guid id)

DokuExtractorStandardGUI/UserControlsTemplateEditor/ucDataFieldClassTemplate.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,9 @@ private void StartRegexOrPositionHelper()
185185
FireRegexOrPositionHelper(id, (DataFieldType)FieldTypeInt, (DataFieldMode)FieldModeInt);
186186
}
187187
catch (Exception ex)
188-
{ }
188+
{
189+
Console.WriteLine(ex.Message);
190+
}
189191
}
190192
}
191193

@@ -197,7 +199,9 @@ private void butDeleteDataField_Click(object sender, EventArgs e)
197199
FireDataFieldEraser(id);
198200
}
199201
catch (Exception ex)
200-
{ }
202+
{
203+
Console.WriteLine(ex.Message);
204+
}
201205
}
202206

203207
private void FireRegexOrPositionHelper(Guid id, DataFieldType dataFieldType, DataFieldMode dataFieldMode)

0 commit comments

Comments
 (0)