thread assignment + exceptions

i actually thought before i wrote the thrad assignment this time,
i also added 2 exceptions: SynchronizationFailed and EndOfFunction both
must have a string (or null) to set their messages