Mercurial > projects > dwt-mac
comparison dwt/DWT.d @ 36:db5a898b2119
Fixed a lot of compile errors
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 07 Oct 2008 12:56:18 +0200 |
parents | f565d3a95c0a |
children | 642f460a0908 |
comparison
equal
deleted
inserted
replaced
35:7d135fe0caf2 | 36:db5a898b2119 |
---|---|
3695 * Example: "DWT051" is 51 | 3695 * Example: "DWT051" is 51 |
3696 * | 3696 * |
3697 * @return the DWT version number | 3697 * @return the DWT version number |
3698 */ | 3698 */ |
3699 public static int getVersion () { | 3699 public static int getVersion () { |
3700 return Library.DWT_VERSION; | 3700 return Library.SWT_VERSION; |
3701 } | 3701 } |
3702 | 3702 |
3703 /** | 3703 /** |
3704 * Throws an appropriate exception based on the passed in error code. | 3704 * Throws an appropriate exception based on the passed in error code. |
3705 * | 3705 * |
3706 * @param code the DWT error code | 3706 * @param code the DWT error code |
3707 */ | 3707 */ |
3708 public static void error (String file, long line, int code) { | |
3709 error (code, null); | |
3710 } | |
3711 | |
3708 public static void error (int code) { | 3712 public static void error (int code) { |
3709 error(code, null); | 3713 error(code, null); |
3710 } | 3714 } |
3711 | 3715 |
3712 /** | 3716 /** |
3780 * original problem, we simply re-throw the original exception here. | 3784 * original problem, we simply re-throw the original exception here. |
3781 * | 3785 * |
3782 * NOTE: Exceptions thrown in syncExec and asyncExec must be | 3786 * NOTE: Exceptions thrown in syncExec and asyncExec must be |
3783 * wrapped. | 3787 * wrapped. |
3784 */ | 3788 */ |
3785 if (code != SWT.ERROR_FAILED_EXEC) { | 3789 if (code != DWT.ERROR_FAILED_EXEC) { |
3786 if (cast(SWTError) throwable) throw cast(SWTError) throwable; | 3790 if (cast(DWTError) throwable) throw cast(DWTError) throwable; |
3787 if (cast(SWTException) throwable) throw cast(SWTException) throwable; | 3791 if (cast(DWTException) throwable) throw cast(DWTException) throwable; |
3788 } | 3792 } |
3789 | 3793 |
3790 String message = findErrorText (code); | 3794 String message = findErrorText (code); |
3791 if (detail !is null) message += detail; | 3795 if (detail !is null) message += detail; |
3792 switch (code) { | 3796 switch (code) { |