trycatch in findPlatform