} catch (err) { def msgErr = err.getMessage() def lineHintWorks = false if (lineHintWorks) { String str= err.getStackTrace().toString() def pattern = ( str =~ /groovy.(\d+)./ ) return " Error at line number = " + pattern[0][1] + ". more: "+msgErr } def rutaMotivoErr if (msgErr=="[formato_fichero_noestarndar]" || msgErr=="[video_roto]") rutaMotivoErr="/fichero/" else if (msgErr=="[genero_no_especificado]" || msgErr=="[certificado_edad_no_especificado]") { rutaMotivoErr="/themoviedb/" } else if (msgErr.startsWith("[idioma_audio")) { rutaMotivoErr="/audio/" } else { def errSplitted = msgErr.split("\\-") return msgErr if (errSplitted==null) { rutaMotivoErr="/error_desconocido/" } else { def errType = errSplitted[0] if (errType=="[formato_audio_no_encontrado") rutaMotivoErr="/audio/" else if (errType.startsWith("[idioma_audio")) rutaMotivoErr="/idioma/" else { String str2= err.getStackTrace().toString() def pattern2 = ( str2 =~ /groovy.(\d+)./ ) return " Error at line number = " + pattern2[0][1] } } } def resultado = rutaKO + rutaMotivoErr + msgErr + '/' + localize.English.plex.name + '/' + fn return resultado }