Skip to content

Commit bcc0f47

Browse files
committed
Modified to put more clear exception log.
1 parent 79beead commit bcc0f47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Assets/QuickSheet/ExcelPlugin/Editor/ExcelQuery.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class ExcelQuery
2424
{
2525
private readonly IWorkbook workbook = null;
2626
private readonly ISheet sheet = null;
27+
private string filepath = string.Empty;
2728

2829
/// <summary>
2930
/// Constructor.
@@ -32,6 +33,8 @@ public ExcelQuery(string path, string sheetName = "")
3233
{
3334
try
3435
{
36+
this.filepath = path;
37+
3538
using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
3639
{
3740
string extension = GetSuffix(path);
@@ -161,7 +164,7 @@ public List<T> Deserialize<T>(int start = 1)
161164
catch(Exception e)
162165
{
163166
string pos = string.Format("Row[{0}], Cell[{1}]", (current + 1).ToString(), GetHeaderColumnName(i));
164-
Debug.LogError("Excel Deserialize Exception: " + e.Message + " " + pos);
167+
Debug.LogError(string.Format("Excel File {0} Deserialize Exception: {1} at {2}", this.filepath, e.Message, pos));
165168
}
166169
}
167170
}

0 commit comments

Comments
 (0)