-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from fangyincheng/master
Mod:add some exception
- Loading branch information
Showing
88 changed files
with
1,471 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2016-2019 Yincheng Fang | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package java_exception | ||
|
||
type BackingStoreException struct { | ||
SerialVersionUID int64 | ||
DetailMessage string | ||
SuppressedExceptions []Throwabler | ||
StackTrace []StackTraceElement | ||
Cause Throwabler | ||
} | ||
|
||
func NewBackingStoreException(detailMessage string) *BackingStoreException { | ||
return &BackingStoreException{DetailMessage: detailMessage, StackTrace: []StackTraceElement{}} | ||
} | ||
|
||
func (e BackingStoreException) Error() string { | ||
return e.DetailMessage | ||
} | ||
|
||
func (BackingStoreException) JavaClassName() string { | ||
return "java.util.prefs.BackingStoreException" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2016-2019 Yincheng Fang | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package java_exception | ||
|
||
type BrokenBarrierException struct { | ||
SerialVersionUID int64 | ||
DetailMessage string | ||
SuppressedExceptions []Throwabler | ||
StackTrace []StackTraceElement | ||
Cause Throwabler | ||
} | ||
|
||
func NewBrokenBarrierException(detailMessage string) *BrokenBarrierException { | ||
return &BrokenBarrierException{DetailMessage: detailMessage, StackTrace: []StackTraceElement{}} | ||
} | ||
|
||
func (e BrokenBarrierException) Error() string { | ||
return e.DetailMessage | ||
} | ||
|
||
func (BrokenBarrierException) JavaClassName() string { | ||
return "java.util.concurrent.BrokenBarrierException" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2016-2019 Yincheng Fang | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package java_exception | ||
|
||
type CancellationException struct { | ||
SerialVersionUID int64 | ||
DetailMessage string | ||
SuppressedExceptions []Throwabler | ||
StackTrace []StackTraceElement | ||
Cause Throwabler | ||
} | ||
|
||
func NewCancellationException(detailMessage string) *CancellationException { | ||
return &CancellationException{DetailMessage: detailMessage, StackTrace: []StackTraceElement{}} | ||
} | ||
|
||
func (e CancellationException) Error() string { | ||
return e.DetailMessage | ||
} | ||
|
||
func (CancellationException) JavaClassName() string { | ||
return "java.util.concurrent.CancellationException" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright 2016-2019 Yincheng Fang | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package java_exception | ||
|
||
type ClassNotFoundException struct { | ||
SerialVersionUID int64 | ||
DetailMessage string | ||
SuppressedExceptions []Throwabler | ||
StackTrace []StackTraceElement | ||
Cause Throwabler | ||
Ex Throwabler | ||
} | ||
|
||
func NewClassNotFoundException(detailMessage string, ex Throwabler) *ClassNotFoundException { | ||
return &ClassNotFoundException{DetailMessage: detailMessage, StackTrace: []StackTraceElement{}, Ex: ex} | ||
} | ||
|
||
func (e ClassNotFoundException) Error() string { | ||
return e.DetailMessage | ||
} | ||
|
||
func (ClassNotFoundException) JavaClassName() string { | ||
return "java.lang.ClassNotFoundException" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2016-2019 Yincheng Fang | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package java_exception | ||
|
||
type DataFormatException struct { | ||
SerialVersionUID int64 | ||
DetailMessage string | ||
SuppressedExceptions []Throwabler | ||
StackTrace []StackTraceElement | ||
Cause Throwabler | ||
} | ||
|
||
func NewDataFormatException(detailMessage string) *DataFormatException { | ||
return &DataFormatException{DetailMessage: detailMessage, StackTrace: []StackTraceElement{}} | ||
} | ||
|
||
func (e DataFormatException) Error() string { | ||
return e.DetailMessage | ||
} | ||
|
||
func (DataFormatException) JavaClassName() string { | ||
return "java.util.zip.DataFormatException" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright 2016-2019 Yincheng Fang | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package java_exception | ||
|
||
type DateTimeException struct { | ||
SerialVersionUID int64 | ||
DetailMessage string | ||
SuppressedExceptions []Throwabler | ||
StackTrace []StackTraceElement | ||
Cause Throwabler | ||
} | ||
|
||
func NewDateTimeException(detailMessage string) *DateTimeException { | ||
return &DateTimeException{DetailMessage: detailMessage, StackTrace: []StackTraceElement{}} | ||
} | ||
|
||
func (e DateTimeException) Error() string { | ||
return e.DetailMessage | ||
} | ||
|
||
func (DateTimeException) JavaClassName() string { | ||
return "java.time.DateTimeException" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2016-2019 Yincheng Fang | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package java_exception | ||
|
||
type DateTimeParseException struct { | ||
SerialVersionUID int64 | ||
DetailMessage string | ||
SuppressedExceptions []Throwabler | ||
StackTrace []StackTraceElement | ||
Cause Throwabler | ||
ParsedString string | ||
ErrorIndex int32 | ||
} | ||
|
||
func NewDateTimeParseException(detailMessage string, parsedString string, errorIndex int32) *DateTimeParseException { | ||
return &DateTimeParseException{DetailMessage: detailMessage, StackTrace: []StackTraceElement{}, ParsedString: parsedString, ErrorIndex: errorIndex} | ||
} | ||
|
||
func (e DateTimeParseException) Error() string { | ||
return e.DetailMessage | ||
} | ||
|
||
func (DateTimeParseException) JavaClassName() string { | ||
return "java.time.format.DateTimeParseException" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.