Try changing (define-foreign-enum-type (exceptiontype int) ...) to (define-foreign-enum-type (exceptiontype (enum "ExceptionType")) ...)