usql updates
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include "exception.h"
|
||||
#include "csvreader.h"
|
||||
#include "parser.h"
|
||||
|
||||
@@ -30,9 +32,10 @@ int CsvReader::parseCSV(const std::string &filename, std::vector<ColDefNode> &co
|
||||
std::vector<std::string> line;
|
||||
line.reserve(32);
|
||||
|
||||
errno = 0;
|
||||
FILE* fp = fopen(filename.c_str(), "r");
|
||||
if (fp == NULL)
|
||||
exit(EXIT_FAILURE);
|
||||
throw Exception("load from csv, cannot read from file(" + std::to_string(errno) + ")");
|
||||
|
||||
char* line_str = NULL;
|
||||
size_t len = 0;
|
||||
|
||||
Reference in New Issue
Block a user