rethrow error instead of return null

As commented in Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=401785