fix(Exception): clean ugly code + fix windows build

Status Job ID Name Coverage
  External
passed jenkins

00:00:51

passed jenkins

00:00:29

passed jenkins

00:00:52

passed jenkins

00:00:54

passed jenkins

00:00:57