Change assert to PlatformException to enable debug of ooiion-1327
fix exception check
Merge pull request #1372 from MauriceManning/1327_rebase

Change assert to PlatformException to enable debug of ooiion-1327