Update swapmanager.py

exit(err) added on three exceptions. Might fix the crashing bug.