OOIION-1327 Change assert to PlatformException to enable debug

@jamie-cyber1 please review