enable -deprecation for Scala 2.10

Enable `-deprecation` flag to catch old code being use when we migrate things.
In this commit I moved error to sys.error.