Change assert to PlatformException to enable debug of ooiion-1327

@jamie-cyber1 please review