String (@NotNull Throwable error) { var current = error; while (true) { var location = getLocationFromStack(current); if (location != null) { return location; } var cause = current.getCause(); if (cause == null || cause == current) { break; } else { current = cause; } } return null; }