[ENH] Replace asserts with proper if else Exception handling
#1589
+87
−80
Loading