<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_dir(self, jbfile):
 """Create a dir for the given dirfile and display an error message, if it fails. :param jbfile: the jb file to make the directory for :type jbfile: class:`JB_File` :returns: None :rtype: None :raises: None """

        try:
            jbfile.create_directory()
        except os.error:
            self.statusbar.showMessage('Could not create path: %s' % jbfile.get_path())