|
@@ -118,7 +118,15 @@ namespace OASystem.API.Controllers
|
|
{
|
|
{
|
|
var item = dataList.First(s => s.row_start == i && s.col_start == j);
|
|
var item = dataList.First(s => s.row_start == i && s.col_start == j);
|
|
string words = item.words.Replace("\\n", "");
|
|
string words = item.words.Replace("\\n", "");
|
|
- string values = dicHeader[j];
|
|
|
|
|
|
+ string values = string.Empty;
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ values = dicHeader[j];
|
|
|
|
+ }
|
|
|
|
+ catch (Exception)
|
|
|
|
+ {
|
|
|
|
+ throw new Exception("有未能识别的列头请检查 : " + JsonConvert.SerializeObject(headerList.Select(x => x.words)));
|
|
|
|
+ }
|
|
|
|
|
|
if (words.IsNullOrWhiteSpace())
|
|
if (words.IsNullOrWhiteSpace())
|
|
{
|
|
{
|
|
@@ -218,7 +226,7 @@ namespace OASystem.API.Controllers
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
jw.Code = 400;
|
|
jw.Code = 400;
|
|
- jw.Msg = "程序异常!";
|
|
|
|
|
|
+ jw.Msg = "程序异常!" + ex.Message;
|
|
jw.Data = new string[0];
|
|
jw.Data = new string[0];
|
|
}
|
|
}
|
|
|
|
|