Commit cd158fc6 by Leo Zheng

修改了错误处理

parent 848ebb20
......@@ -44,11 +44,11 @@ export class DataExtractor {
public getData(fileName: string, sheetName: string): any {
const fileData = this.data[fileName];
if (!fileData) {
throw new Error(`File ${fileName} not found`);
throw new Error(`Excel文件不存在`);
}
const sheetData = fileData[sheetName];
if (!sheetData) {
throw new Error(`Sheet ${sheetName} not found in file ${fileName}`);
throw new Error(`表格不存在`);
}
return sheetData;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment