added toJson method
replaced Exception class and optimize some code
modified mysql class trigger exception level
modified trigger exception level n changed some code
nth changed -v-
added js helper not finished yet