Skip to content

Commit

Permalink
Modified to put more clear exception log.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsama committed Apr 27, 2016
1 parent 79beead commit bcc0f47
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Assets/QuickSheet/ExcelPlugin/Editor/ExcelQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class ExcelQuery
{
private readonly IWorkbook workbook = null;
private readonly ISheet sheet = null;
private string filepath = string.Empty;

/// <summary>
/// Constructor.
Expand All @@ -32,6 +33,8 @@ public ExcelQuery(string path, string sheetName = "")
{
try
{
this.filepath = path;

using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
string extension = GetSuffix(path);
Expand Down Expand Up @@ -161,7 +164,7 @@ public List<T> Deserialize<T>(int start = 1)
catch(Exception e)
{
string pos = string.Format("Row[{0}], Cell[{1}]", (current + 1).ToString(), GetHeaderColumnName(i));
Debug.LogError("Excel Deserialize Exception: " + e.Message + " " + pos);
Debug.LogError(string.Format("Excel File {0} Deserialize Exception: {1} at {2}", this.filepath, e.Message, pos));
}
}
}
Expand Down

0 comments on commit bcc0f47

Please sign in to comment.