func (l *Lobster) RecoverRoutinePanic(caller string, critical bool) {
	defer l.waitGroup.Done()

	if err := recover(); err != nil {
		if err, ok := err.(exceptions.GenericException); ok {
			l.channel <- exceptions.RoutineException{
				Message:     err.GetErrorMessage(),
				RoutineName: caller,
				Critical:    critical,
			}
		} else {
			l.channel <- exceptions.RoutineException{
				Message:     fmt.Sprint(err),
				RoutineName: caller,
				Critical:    critical,
			}
		}
	}
}
// RecoverRoutinePanic recover panics inside routines and push it to lobster
// error channel.
RecoverRoutinePanic recover panics inside routines and push it to lobster
error channel.
// RecoverRoutinePanic recover panics inside routines and push it to lobster // error channel .
func (l *Lobster) RecoverRoutinePanic(caller string, critical bool) {
	defer l.waitGroup.Done()
	if err := recover(); err != nil {
		if err, ok := err.(exceptions.GenericException); ok {
			l.channel <- exceptions.RoutineException{
				Message:     err.GetErrorMessage(),
				RoutineName: caller,
				Critical:    critical,
			}
		} else {
			l.channel <- exceptions.RoutineException{
				Message:     fmt.Sprint(err),
				RoutineName: caller,
				Critical:    critical,
			}
		}
	}
}
func ( l * Lobster ) RecoverRoutinePanic ( caller string , critical bool ) { defer l . waitGroup . Done ( ) if err := recover ( ) ; err != nil { if err , ok := err . ( exceptions . GenericException ) ; ok { l . channel <- exceptions . RoutineException { Message : err . GetErrorMessage ( ) , RoutineName : caller , Critical : critical , } } else { l . channel <- exceptions . RoutineException { Message : fmt . Sprint ( err ) , RoutineName : caller , Critical : critical , } } } }
RecoverRoutinePanic recover panics inside routines and push it to lobster
error channel.
RecoverRoutinePanic recover panics inside routines and push it to lobster error channel .