cjlin1 / libsvm

LIBSVM -- A Library for Support Vector Machines
https://www.csie.ntu.edu.tw/~cjlin/libsvm/
BSD 3-Clause "New" or "Revised" License
4.55k stars 1.64k forks source link

throw IOException when failing to load svm_model #72

Open StaffanArvidsson opened 8 years ago

StaffanArvidsson commented 8 years ago

svm.svm_load_model returned null when given a non valid file, make more sense to throw an exception instead (now throws IOException). Added svm_print_err_string that works the same way as svm_print_string in svm.java. Now there's a way to remove printing errors directly to System.err which is bad if you wish to use libsvm as part of another java project. Added setter method for setting the svm_print_err_string