public CommandLine(String[] anArgArray) {
        args = anArgArray;

        boolean isSuccessful = true;

        //parsing the credentials from the args first
        try {
            cre1 = fetchCredentials(1);
            cre2 = fetchCredentials(2);
            System.out.println("Credentials parsed successfully");
        } catch (Exception x) {
            System.err.println(x.getMessage());
            isSuccessful = false;
        }

        //then creating the connectors
        if (isSuccessful) {
            try {
                c1 = new Connector(cre1);
                c2 = new Connector(cre2);
            } catch (Exception x) {
                x.printStackTrace();
                System.err.println("Error while attempting to connect to databases");
                isSuccessful = false;
            }
        } else {
            System.exit(1);
        }

        //if the connection was successful, carry on comparing
        if (isSuccessful) {
            try {
                db = new DBLayer(c1, c2);
                diffs = db.compare();
            } catch (Exception x) {
                x.printStackTrace();
                System.err.println("Error while comparing the schemas");
                isSuccessful = false;
            }
        } else {
            System.exit(1);
        }

        //finally printing the results in the result.txt file
        if (isSuccessful) {
            try {
                db.printReport(diffs);
            } catch (Exception x) {
                x.printStackTrace();
                System.err.println("Error while attempting to create the report");
                isSuccessful = false;
            }
        } else {
            System.exit(1);
        }

        //finally exiting
        if (isSuccessful) {
            System.out.println("Finished");
            try {
                c1.closeConnection();
                c2.closeConnection();
            } catch (Exception x) {
                System.err.println("Error while terminating connections, nevermind, exiting");
            }
            System.exit(0);
        } else {
            System.exit(1);
        }
    }