Clase | ¿Qué representa? | ¿Es necesario manejarla o declararla? | ¿Quién las lanza principalmente? |
---|---|---|---|
Throwable |
La clase raíz de todas las excepciones y errores. | No, es la clase base. | JVM o el programador. |
Error |
Errores graves que normalmente son de la JVM y no se deben manejar. | No, no se deben manejar. | JVM (ej. OutOfMemoryError , StackOverflowError ). |
Exception |
Excepciones que el programa puede y debe manejar. | Sí, si es una excepción comprobada (checked). | Programador (ej. IOException , SQLException ). |
RuntimeException |
Errores de ejecución que son excepciones no comprobadas. | No, son no comprobadas (unchecked). | Programador (ej. NullPointerException , ArithmeticException ). |
Show certificate from server:
openssl s_client -connect some_host:443
Download certificate from server:
keytool -printcert -rfc -sslserver :443 > cert.pem
git init
git add .
git commit -m "Initial commit"
git tag 1.0.0
git switch -c develop
brew install --cask ngrok
After login at https://dashboard.ngrok.com/, get your token.
ngrok config add-authtoken
The following message is showed: Authtoken saved to configuration file: ~/Library/Application Support/ngrok/ngrok.yml
This file contains hidden or 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
@Entity | |
@Cacheable | |
public class OrderEntity extends PanacheEntityBase { | |
@Id | |
@SequenceGenerator(allocationSize = 1,name = "orderEntitySequence", schema = "public", sequenceName = "order_entity_seq") | |
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "orderEntitySequence") | |
@Column(name = "id", nullable = false) | |
public Long id; | |
This file contains hidden or 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
// path: .vscode/launch.json | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "java", | |
"name": "Debug (Attach)", | |
"projectName": "WSO2 MI 4.2.0", | |
"request": "attach", | |
"hostName": "localhost", |
This file contains hidden or 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
mixin Electric { | |
double _batteryCapacity = 0.0, _battery = 0.0; | |
void engineStart() { | |
assert(_battery > 0.05, 'No _battery, please charge'); | |
_battery -= (_battery * 0.05); | |
} | |
void charge(double energy) { | |
assert(energy > 0, 'Energy cannot be less than or equal to 0'); |
NewerOlder