add try and catch block in datasource in datasource.php
reason: i really really dislike php